]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1815815: Library Groups
[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" reporter:selector="field"/>
222                         <field reporter:label="Group" name="grp" reporter:datatype="link" config_field="true"/>
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="label"/>
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                         <field reporter:label="Fields" name="import_bib_trash_fields" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                         <link field="import_bib_trash_fields" reltype="has_many" key="grp" map="" class="vibtf"/>
352                 </links>
353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
354                         <actions>
355                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                                 <retrieve/>
357                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
358                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
359                         </actions>
360                 </permacrud>
361         </class>
362
363
364         <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">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
366                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
367                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
368                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
369                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
370                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
371                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
372                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
373                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
374                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
375                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
376                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
377                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
378                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
379                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
380                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
381                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
382                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
383                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
384                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
385                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
386                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
387                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
388                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
389                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
390                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
391                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
392                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
393                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
394                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
395                 </fields>
396                 <links>
397                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
398                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
399                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
400                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
401                 </links>
402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
403                         <actions>
404                                 <create permission="CREATE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </create>
407                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </retrieve>
410                                 <update permission="UPDATE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </update>
413                                 <delete permission="DELETE_IMPORT_ITEM">
414                     <context link="definition" field="owner"/>
415                                 </delete>
416                         </actions>
417                 </permacrud>
418         </class>
419
420         <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">
421                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
422                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
423                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
424                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
425                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
426                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
427                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
428                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
429                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
430                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
431                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
432                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
433                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
434                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
435                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
436                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
437                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
438                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
439                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
440                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
441                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
442                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
443                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
444                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
445                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
446                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
447                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
448                 </fields>
449                 <links>
450                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
451                 </links>
452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
453                         <actions>
454                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                                 <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"/>
456                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
457                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
458                         </actions>
459                 </permacrud>
460         </class>
461
462         <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">
463                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
464                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
465                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
466                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
467                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
468                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
469                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
470                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
471                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
472                 </fields>
473                 <links>
474                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
475                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
476                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
477                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
478                 </links>
479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
480                         <actions>
481                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
482                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
483                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
484                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
485                         </actions>
486                 </permacrud>
487         </class>
488
489         <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">
490                 <fields oils_persist:primary="code">
491                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
492                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
493                 </fields>
494                 <links>
495                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
496                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
497                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
498                 </links>
499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
500                         <actions>
501                                 <retrieve/>
502                         </actions>
503                 </permacrud>
504         </class>
505
506         <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">
507                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
508                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
509                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
510                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
511                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
512                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
513                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
514                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
515                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
516                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
517                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
518                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
519                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
520                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
521                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
522                 </fields>
523                 <links>
524                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
525                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
526                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
527                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
528             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
529             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
530             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
531                 </links>
532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
533                         <actions>
534                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
535                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
536                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
537                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
538                         </actions>
539                 </permacrud>
540         </class>
541
542         <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">
543                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
544                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
545                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
546                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
547                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
548                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
549                 </fields>
550                 <links/>
551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
552                         <actions>
553                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
554                 <retrieve/>
555                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
556                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
557                         </actions>
558                 </permacrud>
559         </class>
560
561         <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">
562                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
563                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
564                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
565                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
566                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
567                 </fields>
568                 <links>
569                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
570                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
571                 </links>
572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
573                         <actions>
574                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
575                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
576                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
577                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
578                         </actions>
579                 </permacrud>
580         </class>
581
582         <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">
583                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
584                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
585                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
586                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
587                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
588                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
589                 </fields>
590                 <links>
591                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
592                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
593                 </links>
594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
595                         <actions>
596                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
597                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
598                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
599                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
600                         </actions>
601                 </permacrud>
602         </class>
603
604         <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">
605                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
606                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
607                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
608                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
609                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
610                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
611                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
612                 </fields>
613                 <links>
614                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
615                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
616                 </links>
617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
618                         <actions>
619                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
622                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
623                         </actions>
624                 </permacrud>
625         </class>
626
627         <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">
628                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
629                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
630                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
631                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
632                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
633                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
634                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
635                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
636                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
637                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
638                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
639                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
640                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
641                 </fields>
642                 <links>
643                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
644                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
645                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
646             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
647             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
648                 </links>
649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
650                         <actions>
651                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
653                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
654                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
655                         </actions>
656                 </permacrud>
657         </class>
658
659         <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">
660                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
661                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
662                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
663                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
664                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
665                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
666                 </fields>
667                 <links/>
668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
669                         <actions>
670                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                 <retrieve/>
672                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
673                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
674                         </actions>
675                 </permacrud>
676         </class>
677
678         <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">
679                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
680                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
681                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
682                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
683                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
684                 </fields>
685                 <links>
686                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
687                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
688                 </links>
689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
690                         <actions>
691                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
693                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
694                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
695                         </actions>
696                 </permacrud>
697         </class>
698
699         <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">
700                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
701                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
702                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
703                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
704                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
705                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
706                 </fields>
707                 <links>
708                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
709                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
710                 </links>
711                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
712                         <actions>
713                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
715                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
716                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
717                         </actions>
718                 </permacrud>
719         </class>
720
721         <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">
722                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
723                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
724                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
725                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
726                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
727                 </fields>
728                 <links>
729                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
730                 </links>
731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
732                         <actions>
733                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
735                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
736                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
737                         </actions>
738                 </permacrud>
739         </class>
740
741         <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">
742                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
743                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
744                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
745                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
746                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
747                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
748                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
749                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
750             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
751                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
752                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
753                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
754                 </fields>
755                 <links>
756                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
757                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
758                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
759                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
760                 </links>
761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
762                         <actions>
763                                 <create permission="ADMIN_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </create>
766                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </retrieve>
769                                 <update permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </update>
772                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
773                     <context link="match_set" field="owner"/>
774                                 </delete>
775                         </actions>
776                 </permacrud>
777         </class>
778
779         <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">
780                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
781                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
782                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
783                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
784                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
785                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
786                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
787                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
788                 </fields>
789                 <links>
790                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
791                 </links>
792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
793                         <actions>
794                                 <create permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </create>
797                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </retrieve>
800                                 <update permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </update>
803                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
804                     <context link="match_set" field="owner"/>
805                                 </delete>
806                         </actions>
807                 </permacrud>
808         </class>
809
810         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
811                 oils_obj:fieldmapper="vandelay::session_tracker" 
812                 oils_persist:tablename="vandelay.session_tracker" 
813                 reporter:label="Vandelay Session Tracker">
814                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
815                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
816                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
817                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
818                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
819                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
820                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
821                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
822                                          queue or an auth queue and there's no IDL class for vandelay.queue .
823                                          parent table.
824                         -->
825                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
826                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
827                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
828                         <field reporter:label="State" name="state" reporter:datatype="text"/>
829                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
830                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
831                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
832                 </fields>
833                 <links>
834                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
835                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
836                 </links>
837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
838                         <actions>
839                                 <!-- created by the API -->
840                                 <retrieve global_required="true"
841                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
842                                 <update global_required="true"
843                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
844                                         <context link="workstation" field="owning_lib"/>
845                                 </update>
846                                 <delete 
847                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
848                                         <context link="workstation" field="owning_lib"/>
849                                 </delete>
850                         </actions>
851                 </permacrud>
852         </class>
853
854         <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">
855                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
856                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
857                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
858                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
859                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
860                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
861                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
862                 </fields>
863                 <links>
864                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
865                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
866                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
867                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
868                 </links>
869         </class>
870
871     <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">
872         <fields oils_persist:primary="name">
873             <field reporter:label="Name" name="name" reporter:datatype="text"/>
874             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
875             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
876             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
877         </fields>
878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
879             <actions>
880                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
882                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
883                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
884             </actions>
885         </permacrud>
886     </class>
887
888     <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">
889         <fields oils_persist:primary="id">
890             <field reporter:label="ID" name="id" reporter:datatype="id"/>
891             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
892             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
893             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
894             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
895         </fields>
896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
897             <actions>
898                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
899                 <retrieve/>
900                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
901                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
902             </actions>
903         </permacrud>
904     </class>
905
906         <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">
907                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
908                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
909                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
910                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
911                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
912                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
913                 </fields>
914                 <links>
915                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
916                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
917                 </links>
918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
919             <actions>
920                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
921                 <retrieve/>
922                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
923                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
924             </actions>
925         </permacrud>
926         </class>
927
928         <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">
929                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
930                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
931                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
933         </fields>
934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
935             <actions>
936                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
937                 <retrieve/>
938                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
939                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
940             </actions>
941         </permacrud>
942         </class>
943
944         <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">
945                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
946                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
947                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
948                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
949                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
950                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
951                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
952                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
953                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
954                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
955                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
956                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
957         </fields>
958                 <links>
959                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
960                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
961         </links>
962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
963             <actions>
964                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
965                 <retrieve/>
966                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
967                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
968             </actions>
969         </permacrud>
970         </class>
971
972         <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">
973                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
974                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
975                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
976                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
977                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
978                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
979                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
980                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
981                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
982                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
983                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
984         </fields>
985                 <links>
986                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
987                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
988         </links>
989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
990             <actions>
991                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
992                 <retrieve/>
993                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
994                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
995             </actions>
996         </permacrud>
997         </class>
998
999         <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">
1000                 <fields oils_persist:primary="name">
1001                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
1002                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1003                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1004                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1005                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1006                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1007                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1008                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1009                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1010                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1011                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1012                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1013                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1014                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1015                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1016                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1017                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1018                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1019                 </fields>
1020                 <links>
1021                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1022                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1023                 </links>
1024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1025             <actions>
1026                 <create permission="ADMIN_SVF" global_required="true"/>
1027                 <retrieve/>
1028                 <update permission="ADMIN_SVF" global_required="true"/>
1029                 <delete permission="ADMIN_SVF" global_required="true"/>
1030             </actions>
1031         </permacrud>
1032         </class>
1033
1034         <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">
1035                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1036                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1037                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1038                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1039             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
1040                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1041                 </fields>
1042                 <links/>
1043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1044             <actions>
1045                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1046                 <retrieve/>
1047                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1048                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1049             </actions>
1050         </permacrud>
1051         </class>
1052
1053         <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">
1054                 <fields oils_persist:primary="coded_value">
1055                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1056                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1057                 </fields>
1058                 <links>
1059                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1060                 </links>
1061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1062             <actions>
1063                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1064                 <retrieve/>
1065                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1066                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1067             </actions>
1068         </permacrud>
1069         </class>
1070
1071         <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">
1072                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1073                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1074                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1075                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1076                 </fields>
1077                 <links>
1078                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1079                 </links>
1080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1081             <actions>
1082                 <retrieve/>
1083             </actions>
1084         </permacrud>
1085         </class>
1086
1087
1088         <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">
1089                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1090                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1091                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1092                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1093                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1094                 </fields>
1095                 <links>
1096                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1097                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106
1107         <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">
1108                 <fields oils_persist:primary="source">
1109                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1110                         <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 -->
1111                 </fields>
1112                 <links>
1113                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1114                 </links>
1115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1116             <actions>
1117                 <retrieve/>
1118             </actions>
1119         </permacrud>
1120         </class>
1121
1122         <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">
1123                 <fields>
1124                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1125                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1126                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1127                 </fields>
1128                 <links>
1129                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1130                 </links>
1131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1132             <actions>
1133                 <retrieve/>
1134             </actions>
1135         </permacrud>
1136         </class>
1137
1138         <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">
1139                 <fields oils_persist:primary="id">
1140                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1141                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1142                 </fields>
1143                 <links>
1144                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1145                 </links>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <retrieve/>
1149             </actions>
1150         </permacrud>
1151         </class>
1152
1153         <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">
1154                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1155                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1156                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1157                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1158                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1159                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1160                 </fields>
1161                 <links>
1162                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1163                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1164                 </links>
1165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1166             <actions>
1167                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1168                 <retrieve/>
1169                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1170                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1171             </actions>
1172         </permacrud>
1173         </class>
1174
1175         <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">
1176                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1177                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1178                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1179                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1180                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1181                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1182                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1183                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1185             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1186             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1187                 </fields>
1188                 <links>
1189                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1190                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1191                 </links>
1192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1193             <actions>
1194                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1195                 <retrieve/>
1196                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1197                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1198             </actions>
1199         </permacrud>
1200         </class>
1201
1202         <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">
1203                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1204                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1205                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1206                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1207                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1208                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1209                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1210                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1211                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1212                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1213                 </fields>
1214                 <links>
1215                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1216                 </links>
1217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1218             <actions>
1219                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1221                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1222                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1223             </actions>
1224         </permacrud>
1225         </class>
1226
1227     <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">
1228         <fields oils_persist:primary="name">
1229             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1230             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1231             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1232             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1233             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1234             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1235             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1236             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1237             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link" config_field="true"/>
1238             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1239         </fields>
1240         <links>
1241             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1242             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1243         </links>
1244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1245             <actions>
1246                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1247                 <retrieve/>
1248                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1249                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250             </actions>
1251         </permacrud>
1252     </class>
1253
1254     <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">
1255         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1256             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1257             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link" config_field="true"/>
1258             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1259             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1260             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1261             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1262             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1263         </fields>
1264         <links>
1265             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1266         </links>
1267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1268             <actions>
1269                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1270                 <retrieve/>
1271                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1272                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1273             </actions>
1274         </permacrud>
1275     </class>
1276
1277     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1278                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1279                         oils_persist:tablename="config.z3950_index_field_map" 
1280                         reporter:label="Z39.50 Index Field Map">
1281         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1282             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1283             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1284             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1285             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1286             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1287             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1288         </fields>
1289         <links>
1290             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1291             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1292             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1293         </links>
1294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1295             <actions>
1296                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1297                 <retrieve/>
1298                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1299                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1300             </actions>
1301         </permacrud>
1302     </class>
1303
1304
1305         <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">
1306                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1307                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1308                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1309                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1310                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1311                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1312                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1313                 </fields>
1314                 <links>
1315             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1316             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1317                 </links>
1318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1319                         <actions>
1320                                 <retrieve/>
1321                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1322                         </actions>
1323                 </permacrud>
1324         </class>
1325
1326         <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">
1327                 <fields oils_persist:primary="key">
1328                         <field reporter:label="Hook Key" name="key" reporter:datatype="text" reporter:selector="key"/>
1329                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1330                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1331                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1332                 </fields>
1333                 <links/>
1334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1335                         <actions>
1336                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1337                                 <retrieve/>
1338                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1339                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1340                         </actions>
1341                 </permacrud>
1342         </class>
1343
1344         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1345                 <fields oils_persist:primary="module">
1346                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1347                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1348                 </fields>
1349                 <links/>
1350         </class>
1351
1352         <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">
1353                 <fields oils_persist:primary="module">
1354                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1355                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1356                 </fields>
1357                 <links/>
1358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1359                         <actions>
1360                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1361                                 <retrieve/>
1362                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1363                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1364                         </actions>
1365                 </permacrud>
1366         </class>
1367
1368         <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">
1369                 <fields oils_persist:primary="module">
1370                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1371                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1372                 </fields>
1373                 <links/>
1374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1375                         <actions>
1376                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1377                                 <retrieve/>
1378                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1379                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1380                         </actions>
1381                 </permacrud>
1382         </class>
1383
1384         <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">
1385                 <fields oils_persist:primary="module">
1386                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1387                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1388                 </fields>
1389                 <links/>
1390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1391                         <actions>
1392                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1393                                 <retrieve/>
1394                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1395                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1396                         </actions>
1397                 </permacrud>
1398         </class>
1399
1400         <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">
1401                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1402                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1403                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1404                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1405                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1406                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1407                 </fields>
1408                 <links>
1409                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1410                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1411                 </links>
1412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1413                         <actions>
1414                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1415                     <context link="event_def" field="owner"/>
1416                 </create>
1417                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1418                     <context link="event_def" field="owner"/>
1419                 </retrieve>
1420                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1421                     <context link="event_def" field="owner"/>
1422                 </update>
1423                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1424                     <context link="event_def" field="owner"/>
1425                 </delete>
1426                         </actions>
1427                 </permacrud>
1428         </class>
1429
1430         <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">
1431                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1432                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1433                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1434                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1435                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1436                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1437                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1438                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1439                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1440                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1441                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1442                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1443                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1444                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1445                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1446                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1447                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1448                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1449                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1450                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1451                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1452                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1453                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1454                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1455                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1456                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1457                 </fields>
1458                 <links>
1459                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1460                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1461                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1462                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1463                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1464                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1465                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1466                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1467                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1468                 </links>
1469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1470                         <actions>
1471                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1473                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1474                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1475                         </actions>
1476                 </permacrud>
1477         </class>
1478
1479         <class id="atevdefg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_def_group" oils_persist:tablename="action_trigger.event_def_group" reporter:label="Trigger Event Definition Group" oils_persist:restrict_primary="100">
1480                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_id_seq">
1481                         <field reporter:label="Group ID" name="id" reporter:datatype="id"/>
1482                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1483                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1484                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1485                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1486                         <field reporter:label="Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
1487                 </fields>
1488                 <links>
1489                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1490                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1491                         <link field="members" reltype="has_many" key="grp" map="" class="atevdefgm"/>
1492                 </links>
1493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1494                         <actions>
1495                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1496                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1497                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1498                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1499                         </actions>
1500                 </permacrud>
1501         </class>
1502
1503         <class id="atevdefgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_def_group_member" oils_persist:tablename="action_trigger.event_def_group_member" reporter:label="Trigger Event Definition Group Member">
1504                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_member_id_seq">
1505                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1506                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1507                         <field reporter:label="Group" name="grp"  reporter:datatype="link"/>
1508                         <field reporter:label="Event Definition" name="event_def"  reporter:datatype="link"/>
1509                         <field reporter:label="Sortable" name="sortable" reporter:datatype="bool"/>
1510                         <field reporter:label="Include Holdings" name="holdings" reporter:datatype="bool"/>
1511                         <field reporter:label="Externally Processed" name="external" reporter:datatype="bool"/>
1512                 </fields>
1513                 <links>
1514                         <link field="grp" reltype="has_a" key="id" map="" class="atevdefg"/>
1515                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1516                 </links>
1517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1518                         <actions>
1519                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1520                     <context link="grp" field="owner"/>
1521                 </create>
1522                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1523                     <context link="grp" field="owner"/>
1524                 </retrieve>
1525                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1526                     <context link="grp" field="owner"/>
1527                 </update>
1528                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1529                     <context link="grp" field="owner"/>
1530                 </delete>
1531                         </actions>
1532                 </permacrud>
1533         </class>
1534
1535         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1536                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1537                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1538                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1539                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1540                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1541                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1542                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1543                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1544                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1545                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1546                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1547                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1548                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1549                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1550                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1551                 </fields>
1552                 <links>
1553                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1554                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1555                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1556                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1557                 </links>
1558         </class>
1559
1560         <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">
1561                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1562                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1563                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1564                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1565                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1566                 </fields>
1567                 <links>
1568                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1569                 </links>
1570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1571                         <actions>
1572                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1573                     <context link="event_def" field="owner"/>
1574                 </create>
1575                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1576                     <context link="event_def" field="owner"/>
1577                 </retrieve>
1578                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1579                     <context link="event_def" field="owner"/>
1580                 </update>
1581                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1582                     <context link="event_def" field="owner"/>
1583                 </delete>
1584                         </actions>
1585                 </permacrud>
1586         </class>
1587
1588         <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">
1589                 <oils_persist:source_definition><![CDATA[
1590                 SELECT  atevdef.hook,
1591                         atevdef.name,
1592                         atevdef.reactor,
1593                         atev.id,
1594                         atev.event_def,
1595                         atev.add_time,
1596                         atev.run_time,
1597                         atev.start_time,
1598                         atev.update_time,
1599                         atev.complete_time,
1600                         atev.update_process,
1601                         atev.state,
1602                         atev.user_data,
1603                         atev.template_output,
1604                         atev.error_output,
1605                         atev.async_output,
1606                         targ_circ.id AS target_circ,
1607                         targ_ahr.id AS target_hold,
1608                         COALESCE(
1609                                 targ_circ.circ_lib,
1610                                 targ_ahr.pickup_lib
1611                         ) AS perm_lib
1612                 FROM action_trigger.event atev
1613                 JOIN action_trigger.event_definition atevdef ON
1614                         (atevdef.id = atev.event_def)
1615                 JOIN action_trigger.hook ath ON
1616                         (ath.key = atevdef.hook)
1617                 LEFT JOIN action.circulation targ_circ ON
1618                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1619                 LEFT JOIN action.hold_request targ_ahr ON
1620                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1621                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1622                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1623                                 'circ.staff.max_visible_event_age',
1624                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1625                         ) UNION
1626                         SELECT '1000 YEARS'::INTERVAL AS value
1627                 ) ous)
1628                 ]]></oils_persist:source_definition>
1629                 <fields oils_persist:primary="id">
1630                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1631                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1632                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1633                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1634                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1635                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1636                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1637                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1638                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1639                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1640                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1641                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1642                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1643                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1644                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1645                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1646                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1647                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1648                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1649                 </fields>
1650                 <links>
1651                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1652                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1653                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1654                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1655                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1656                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1657                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1658                 </links>
1659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660                         <actions>
1661                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1662                         </actions>
1663                 </permacrud>
1664         </class>
1665
1666         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1667                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1668                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1669                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1670                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1671                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1672                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1673                 </fields>
1674                 <links>
1675                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1676                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1677                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1678                 </links>
1679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1680                         <actions>
1681                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1682                         </actions>
1683                 </permacrud>
1684         </class>
1685
1686         <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">
1687                 <fields oils_persist:primary="code">
1688                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1689                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1690                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1691                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1692                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1693                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1694                 </fields>
1695                 <links/>
1696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1697             <actions>
1698                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1699                 <retrieve/>
1700                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1701                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1702             </actions>
1703         </permacrud>
1704         </class>
1705
1706         <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">
1707                 <fields oils_persist:primary="code">
1708                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1709                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1710                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1711                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1712                 </fields>
1713                 <links/>
1714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1715             <actions>
1716                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1717                 <retrieve/>
1718                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1719                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1720             </actions>
1721         </permacrud>
1722         </class>
1723
1724         <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">
1725                 <fields oils_persist:primary="code">
1726                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1727                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1728                 </fields>
1729                 <links/>
1730         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1731             <actions>
1732                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1733                 <retrieve/>
1734                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1735                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1736             </actions>
1737         </permacrud>
1738         </class>
1739
1740         <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">
1741                 <fields oils_persist:primary="code">
1742                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1743                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1744                 </fields>
1745                 <links/>
1746         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1747             <actions>
1748                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1749                 <retrieve/>
1750                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1751                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1752             </actions>
1753         </permacrud>
1754         </class>
1755
1756         <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">
1757                 <fields oils_persist:primary="code">
1758                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1759                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1760                 </fields>
1761                 <links/>
1762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1763             <actions>
1764                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1765                 <retrieve/>
1766                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1767                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1768             </actions>
1769         </permacrud>
1770         </class>
1771
1772         <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">
1773                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1774                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1775                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1776                 </fields>
1777                 <links/>
1778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1779             <actions>
1780                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1781                 <retrieve/>
1782                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1783                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1784             </actions>
1785         </permacrud>
1786         </class>
1787
1788         <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">
1789                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1790                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1791                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1792                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1793                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1794                 </fields>
1795         <links>
1796             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1797             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1798             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1799         </links>
1800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1801             <actions>
1802                 <create permission="UPDATE_COPY">
1803                     <context link="target_copy" field="circ_lib"/>
1804                 </create>
1805                 <retrieve/>
1806                 <update permission="UPDATE_COPY">
1807                     <context link="target_copy" field="circ_lib"/>
1808                 </update>
1809                 <delete permission="UPDATE_COPY">
1810                     <context link="target_copy" field="circ_lib"/>
1811                 </delete>
1812             </actions>
1813         </permacrud>
1814         </class>
1815
1816         <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">
1817                 <fields oils_persist:primary="code">
1818                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1819                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1820                 </fields>
1821                 <links/>
1822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1823             <actions>
1824                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1825                 <retrieve/>
1826                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1827                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1828             </actions>
1829         </permacrud>
1830         </class>
1831
1832         <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">
1833                 <fields oils_persist:primary="code">
1834                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1835                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1836                 </fields>
1837                 <links/>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1841                 <retrieve/>
1842                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1843                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1844             </actions>
1845         </permacrud>
1846         </class>
1847
1848         <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">
1849                 <fields oils_persist:primary="code">
1850                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1851                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1852                 </fields>
1853                 <links/>
1854         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1855             <actions>
1856                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1857                 <retrieve/>
1858                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1859                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1860             </actions>
1861         </permacrud>
1862         </class>
1863
1864     <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">
1865         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1866             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1867             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1868             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1869             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1870             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1871             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1872             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1873             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1874             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1875             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1876             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1877             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1878             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1879             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1880             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1881             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1882             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1883         </fields>
1884         <links/>
1885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1886             <actions>
1887                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1888                 <retrieve/>
1889                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1890                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1891             </actions>
1892         </permacrud>
1893     </class>
1894
1895     <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">
1896         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1897             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1898             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1899             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1900             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1901             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1902             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1903             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1904             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1905             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1906             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1907             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1908             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1909             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1910             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1911             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1912             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1913             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1914             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1915             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1916         </fields>
1917         <links/>
1918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1919             <actions>
1920                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1921                 <retrieve/>
1922                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1923                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1924             </actions>
1925         </permacrud>
1926     </class>
1927
1928     <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">
1929         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1930             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1931             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1932             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1933             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1934             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1935         </fields>
1936         <links>
1937             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1938             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1939             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1940         </links>
1941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1942             <actions>
1943                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1944                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1945                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1946                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1947             </actions>
1948         </permacrud>
1949     </class>
1950
1951         <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">
1952                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1953                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1954                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1955                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1956                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1957                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1958                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1959                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1960                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1961                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1962                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1963                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1964                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1965                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1966                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1967                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1968                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1969             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1970                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1971                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1972                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1973                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1974                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1975                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1976                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1977                 </fields>
1978                 <links>
1979                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1980                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1981                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1982                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1983                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1984                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1985                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1986                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
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="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1992             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1993                 </links>
1994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1995             <actions>
1996                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1997                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1998                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1999                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2000             </actions>
2001         </permacrud>
2002         </class>
2003
2004         <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">
2005                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
2006                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
2007                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
2008                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
2009                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
2010                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
2011                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
2012                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
2013                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
2014                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
2015                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
2016                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
2017                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
2018                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
2019                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
2020                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
2021             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
2022                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
2023                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
2024             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
2025                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
2026                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
2027                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2028                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2029             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2030             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
2031             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
2032                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
2033                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
2034                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
2035                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
2036                 </fields>
2037                 <links>
2038                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2039                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2040                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2041                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
2042                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2043                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
2044                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2045                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
2046                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
2047                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2048                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
2049                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
2050                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
2051                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
2052             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2053                 </links>
2054         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2055             <actions>
2056                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2057                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2058                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2059                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2060             </actions>
2061         </permacrud>
2062         </class>
2063
2064     <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">
2065         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2066             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2067             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2068             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2069         </fields>
2070         <links/>
2071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2072             <actions>
2073                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2074                 <retrieve/>
2075                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2076                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2077             </actions>
2078         </permacrud>
2079     </class>
2080
2081     <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">
2082         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2083             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2084             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2085             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2086             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2087             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2088             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2089             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2090         </fields>
2091         <links>
2092             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2093         </links>
2094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2095             <actions>
2096                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2097                 <retrieve/>
2098                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2099                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2100             </actions>
2101         </permacrud>
2102     </class>
2103
2104     <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">
2105         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2106             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2107             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2108             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2109             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2110             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2111         </fields>
2112         <links>
2113             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2114             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2115         </links>
2116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2117             <actions>
2118                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2119                     <context link="matchpoint" field="org_unit"/>
2120                 </create>
2121                 <retrieve/>
2122                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2123                     <context link="matchpoint" field="org_unit"/>
2124                 </update>
2125                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2126                     <context link="matchpoint" field="org_unit"/>
2127                 </delete>
2128             </actions>
2129         </permacrud>
2130     </class>
2131
2132     <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">
2133         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2134             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2135             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2136             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2137         </fields>
2138         <links>
2139             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2140             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2141         </links>
2142         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2143             <actions>
2144                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2145                     <context link="limit_set" field="owning_lib"/>
2146                 </create>
2147                 <retrieve/>
2148                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2149                     <context link="limit_set" field="owning_lib"/>
2150                 </update>
2151                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2152                     <context link="limit_set" field="owning_lib"/>
2153                 </delete>
2154             </actions>
2155         </permacrud>
2156     </class>
2157     <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">
2158         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2159             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2160             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2161             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2162         </fields>
2163         <links>
2164             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2165             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2166         </links>
2167         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2168             <actions>
2169                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2170                     <context link="limit_set" field="owning_lib"/>
2171                 </create>
2172                 <retrieve/>
2173                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2174                     <context link="limit_set" field="owning_lib"/>
2175                 </update>
2176                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2177                     <context link="limit_set" field="owning_lib"/>
2178                 </delete>
2179             </actions>
2180         </permacrud>
2181     </class>
2182
2183     <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">
2184         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2185             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2186             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2187             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2188             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2189         </fields>
2190         <links>
2191             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2192             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2193         </links>
2194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2195             <actions>
2196                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2197                     <context link="limit_set" field="owning_lib"/>
2198                 </create>
2199                 <retrieve/>
2200                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2201                     <context link="limit_set" field="owning_lib"/>
2202                 </update>
2203                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2204                     <context link="limit_set" field="owning_lib"/>
2205                 </delete>
2206             </actions>
2207         </permacrud>
2208     </class>
2209
2210         <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">
2211                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2212                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2213                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2214                 </fields>
2215                 <links/>
2216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2217             <actions>
2218                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2219                 <retrieve/>
2220                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2221                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2222             </actions>
2223         </permacrud>
2224         </class>
2225
2226         <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">
2227                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2228                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2229                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2230                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2231                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2232                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2233                 </fields>
2234                 <links>
2235                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2236                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2237                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2238                 </links>
2239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2240             <actions>
2241                 <create permission="ADMIN_SURVEY">
2242                     <context link="survey" field="owner"/>
2243                 </create>
2244                 <retrieve/>
2245                 <update permission="ADMIN_SURVEY">
2246                     <context link="survey" field="owner"/>
2247                 </update>
2248                 <delete permission="ADMIN_SURVEY">
2249                     <context link="survey" field="owner"/>
2250                 </delete>
2251             </actions>
2252         </permacrud>
2253         </class>
2254         <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">
2255                 <fields oils_persist:primary="id" oils_persist:sequence="">
2256                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2257                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2258                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2259                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2260                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2261                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2262                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2263                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2264                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2265                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2266                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2267                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2268                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2269                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2270                 </fields>
2271                 <links>
2272                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2273                 </links>
2274                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2275                         <actions>
2276                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2277                                         <context link="usr" field="home_ou" />
2278                                 </retrieve>
2279                         </actions>
2280                 </permacrud>
2281         </class>
2282         <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">
2283                 <fields oils_persist:primary="id" oils_persist:sequence="">
2284                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2285                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2286                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2287                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2288                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2289                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2290                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2291                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2292                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2293                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2294                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2295                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2296                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2297                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2298                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2299                 </fields>
2300                 <links>
2301                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2302                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2303                 </links>
2304         </class>
2305         <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">
2306                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2307                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2308                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2309                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2310                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2311                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2312                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2313                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2314                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2315                 </fields>
2316                 <links>
2317                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2318                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2319                 </links>
2320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2321                         <actions> <!-- created magically, so no create action -->
2322                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2323                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2324                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2325                         </actions>
2326                 </permacrud>
2327         </class>
2328         <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)">
2329                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2330                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2331                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2332                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2333                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2334                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2335                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2336                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2337                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2338                 </fields>
2339                 <links>
2340                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2341                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2342                 </links>
2343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2344                         <actions> <!-- created magically, so no create action -->
2345                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2346                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2347                         </actions>
2348                 </permacrud>
2349         </class>
2350         <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">
2351                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2352                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2353                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2354                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2355                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2356                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2357                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2358                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2359                 </fields>
2360                 <links>
2361                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2362                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2363                 </links>
2364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2365             <actions>
2366                 <create permission="UPDATE_USER" context_field="owner">
2367                     <context link="usr" field="home_ou"/>
2368                 </create>
2369                                 <!-- note: public notes are still accessible via API -->
2370                 <retrieve permission="UPDATE_USER">
2371                     <context link="usr" field="home_ou"/>
2372                                 </retrieve>
2373                 <update permission="UPDATE_USER">
2374                     <context link="usr" field="home_ou"/>
2375                                 </update>
2376                 <delete permission="UPDATE_USER">
2377                     <context link="usr" field="home_ou"/>
2378                                 </delete>
2379             </actions>
2380         </permacrud>
2381         </class>
2382         <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">
2383                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_privacy_waiver_id_seq">
2384                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2385                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2386                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2387                         <field reporter:label="Place Holds?" name="place_holds" reporter:datatype="bool" />
2388                         <field reporter:label="Pick Up Holds?" name="pickup_holds" reporter:datatype="bool" />
2389                         <field reporter:label="View Borrowing History?" name="view_history" reporter:datatype="bool" />
2390                         <field reporter:label="Check Out Items?" name="checkout_items" reporter:datatype="bool" />
2391                 </fields>
2392                 <links>
2393                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2394                 </links>
2395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2396                         <actions>
2397                                 <create permission="UPDATE_USER">
2398                                         <context link="usr" field="home_ou"/>
2399                                 </create>
2400                                 <retrieve permission="VIEW_USER">
2401                                         <context link="usr" field="home_ou"/>
2402                                 </retrieve>
2403                                 <update permission="UPDATE_USER">
2404                                         <context link="usr" field="home_ou"/>
2405                                 </update>
2406                                 <delete permission="UPDATE_USER">
2407                                         <context link="usr" field="home_ou"/>
2408                                 </delete>
2409                         </actions>
2410                 </permacrud>
2411         </class>
2412         <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">
2413                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2414                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2415                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2416                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2417                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2418                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2419                 </fields>
2420                 <links>
2421                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2422                 </links>
2423         </class>
2424         <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">
2425                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2426                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2427                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2428                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2429                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2430                 </fields>
2431                 <links>
2432                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2433                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2434                 </links>
2435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2436                         <actions>
2437                                 <retrieve permission="VIEW_USER">
2438                                         <context link="usr" field="home_ou" />
2439                                 </retrieve>
2440                         </actions>
2441                 </permacrud>
2442         </class>
2443         <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">
2444                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2445                         <field name="field" reporter:datatype="link"/>
2446                         <field name="id" reporter:datatype="id" />
2447                         <field name="source" reporter:datatype="link"/>
2448                         <field name="value" reporter:datatype="text"/>
2449                 </fields>
2450                 <links>
2451                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2452                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2453                 </links>
2454         </class>
2455         <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">
2456                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2457                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2458                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2459                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2460                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2461                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2462                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2463                 </fields>
2464                 <links>
2465                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2466                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2467                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2468                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2469                 </links>
2470                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2471                         <actions>
2472                                 <retrieve/>
2473                         </actions>
2474                 </permacrud>
2475         </class>
2476         <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">
2477                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2478                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2479                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2480                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2481                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2482                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2483                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2484                 </fields>
2485                 <links>
2486                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2487                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2488                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2489                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2490                 </links>
2491                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2492                         <actions>
2493                                 <retrieve/>
2494                         </actions>
2495                 </permacrud>
2496         </class>
2497         <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">
2498                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2499                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2500                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2501                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2502                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2503                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2504                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2505                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2506                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2507                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2508                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2509                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2510                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2511                 </fields>
2512                 <links>
2513                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2514                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2515                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2516                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2517                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2518                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2519                 </links>
2520         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2521             <actions>
2522                 <create permission="TRANSIT_COPY" context_field="owner">
2523                     <context link="target_copy" field="circ_lib"/>
2524                 </create>
2525                 <retrieve/>
2526                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2527                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2528             </actions>
2529         </permacrud>
2530         </class>
2531         <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">
2532                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2533                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2534                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2535                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2536                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2537                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2538                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2539                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2540                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2541                 </fields>
2542                 <links>
2543                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2544                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2545                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2546                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2547                 </links>
2548         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2549             <actions>
2550                 <create permission="ADMIN_SURVEY">
2551                     <context link="survey" field="owner"/>
2552                 </create>
2553                 <retrieve permission="VIEW_USER">
2554                     <context link="usr" field="home_ou"/>
2555                 </retrieve>
2556                 <update permission="ADMIN_SURVEY">
2557                     <context link="survey" field="owner"/>
2558                 </update>
2559                 <delete permission="ADMIN_SURVEY">
2560                     <context link="survey" field="owner"/>
2561                 </delete>
2562             </actions>
2563         </permacrud>
2564         </class>
2565         <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">
2566                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2567                         <field name="bucket" />
2568                         <field name="id" reporter:datatype="id" />
2569                         <field name="target_copy" reporter:datatype="link"/>
2570                         <field name="create_time" reporter:datatype="timestamp" />
2571                         <field name="pos" reporter:datatype="int" />
2572                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2573                 </fields>
2574                 <links>
2575                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2576                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2577             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2578                 </links>
2579                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2580                         <actions>
2581                                 <retrieve permission="ADMIN_COPY_BUCKET">
2582                     <context link="bucket" owning_lib="owning_lib"/>
2583                 </retrieve>
2584             </actions>
2585         </permacrud>
2586         </class>
2587         <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">
2588                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2589                         <field name="id" reporter:datatype="id" />
2590                         <field name="item" reporter:datatype="link"/>
2591                         <field name="note" reporter:datatype="text" />
2592                 </fields>
2593                 <links>
2594                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2595                 </links>
2596         </class>
2597
2598         <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">
2599                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2600                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2601                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2602                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2603                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2604                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2605                 </fields>
2606                 <links>
2607                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2608                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2609                 </links>
2610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2611                         <actions>
2612                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2613                                 <retrieve/>
2614                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2615                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2616                         </actions>
2617                 </permacrud>
2618         </class>
2619
2620         <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">
2621                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2622                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2623                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2624                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2625                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2626                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2627                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2628                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2629                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2630                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2631                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2632                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2633                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2634                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2635                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2636                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2637                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2638                 </fields>
2639                 <links>
2640                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2641                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2642                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2643                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2644                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2645                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2646                         <link field="heading_field" reltype="has_a" key="id" map="" class="ahf"/>
2647                 </links>
2648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2649                         <actions>
2650                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2651                                 <retrieve/>
2652                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2653                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2654                         </actions>
2655                 </permacrud>
2656         </class>
2657
2658         <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">
2659                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2660                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2661                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2662                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2663                 </fields>
2664                 <links>
2665                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2666                 </links>
2667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2668                         <actions>
2669                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2670                                 <retrieve/>
2671                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2672                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2673                         </actions>
2674                 </permacrud>
2675         </class>
2676
2677         <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">
2678                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2679                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2680                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2681                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2682                 </fields>
2683                 <links>
2684                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2685                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2686                 </links>
2687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2688                         <actions>
2689                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2690                                 <retrieve/>
2691                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2692                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2693                         </actions>
2694                 </permacrud>
2695         </class>
2696
2697         <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">
2698                 <fields oils_persist:primary="code">
2699                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2700                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2701                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2702                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2703                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2704                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2705                 </fields>
2706                 <links>
2707                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2708                 </links>
2709                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2710                         <actions>
2711                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2712                                 <retrieve/>
2713                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2714                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2715                         </actions>
2716                 </permacrud>
2717         </class>
2718
2719         <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">
2720                 <fields oils_persist:primary="code">
2721                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2722                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2723                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2724                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2725                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2726                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2727                 </fields>
2728                 <links>
2729                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2730                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2731                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2732                 </links>
2733                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2734                         <actions>
2735                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2736                                 <retrieve/>
2737                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2738                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2739                         </actions>
2740                 </permacrud>
2741         </class>
2742
2743     <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">
2744         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2745             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2746             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2747             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2748         </fields>
2749         <links>
2750             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2751             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2752         </links>
2753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2754             <actions>
2755                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2756                 <retrieve/>
2757                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2758                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2759             </actions>
2760         </permacrud>
2761     </class>
2762
2763         <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">
2764                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2765                         <field name="active" reporter:datatype="bool"/>
2766                         <field name="create_date" reporter:datatype="timestamp"/>
2767                         <field name="creator" />
2768                         <field name="deleted" reporter:datatype="bool"/>
2769                         <field name="edit_date" reporter:datatype="timestamp"/>
2770                         <field name="editor" />
2771                         <field name="id" reporter:datatype="id" />
2772                         <field name="last_xact_id" />
2773                         <field name="marc" />
2774                         <field name="source" />
2775                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2776                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2777                         <field name="heading" />
2778                         <field name="simple_heading" />
2779                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2780                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2781                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2782                 </fields>
2783                 <links>
2784                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2785                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2786                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2787                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2788                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2789                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2790                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2791                 </links>
2792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2793                         <actions>
2794                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2795                                 <retrieve/>
2796                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2797                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2798                         </actions>
2799                 </permacrud>
2800         </class>
2801         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2802                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2803                         <field name="char_encoding" />
2804                         <field name="id" />
2805                         <field name="record" />
2806                         <field name="record_status" />
2807                         <field name="thesaurus" />
2808                 </fields>
2809                 <links>
2810                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2811                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2812                 </links>
2813         </class>
2814         <class id="abl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2815                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2816                         <field name="id" reporter:datatype="id" />
2817                         <field name="bib" reporter:datatype="link" />
2818                         <field name="authority" reporter:datatype="link" />
2819                 </fields>
2820                 <links>
2821                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2822                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2823                 </links>
2824                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2825                         <actions>
2826                                 <retrieve/>
2827                         </actions>
2828                 </permacrud>
2829         </class>
2830         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2831                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2832                         <field name="id" reporter:datatype="id" />
2833                         <field name="record" reporter:datatype="link" />
2834                         <field name="atag" reporter:datatype="link" />
2835                         <field name="value" reporter:datatype="text" />
2836                         <field name="thesaurus" reporter:datatype="text" />
2837                 </fields>
2838                 <links>
2839                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2840                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2841                 </links>
2842         </class>
2843
2844         <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">
2845                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2846                         <field name="id" reporter:datatype="id" reporter:selector="label" />
2847                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2848                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2849                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2850                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2851                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2852                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2853                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2854                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2855                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2856                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2857                 </fields>
2858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2859                         <actions>
2860                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2861                                 <retrieve/>
2862                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2863                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2864                         </actions>
2865                 </permacrud>
2866         </class>
2867
2868         <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">
2869                 <fields oils_persist:primary="code" oils_persist:sequence="">
2870                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2871                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2872                 </fields>
2873                 <links/>
2874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2875             <actions>
2876                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2877                 <retrieve/>
2878                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2879                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2880             </actions>
2881         </permacrud>
2882         </class>
2883         <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">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2885                         <field name="accepting_usr" />
2886                         <field name="amount" reporter:datatype="money" />
2887                         <field name="amount_collected" reporter:datatype="money" />
2888                         <field name="approval_code" reporter:datatype="text"/>
2889                         <field name="cash_drawer" reporter:datatype="link"/>
2890                         <field name="cc_number" reporter:datatype="text"/>
2891                         <field name="cc_order_number" reporter:datatype="text"/>
2892                         <field name="cc_processor" reporter:datatype="text"/>
2893                         <field name="id" reporter:datatype="id" />
2894                         <field name="note" reporter:datatype="text"/>
2895                         <field name="payment_ts" reporter:datatype="timestamp"/>
2896                         <field name="xact" reporter:datatype="link"/>
2897                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2898                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2899                 </fields>
2900                 <links>
2901                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2902                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2903                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2904                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2905                 </links>
2906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2907             <actions>
2908                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2909                     <context link="xact" jump="usr" field="home_ou"/>
2910                 </retrieve>
2911                         </actions>
2912                 </permacrud>
2913         </class>
2914         <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">
2915                 <fields oils_persist:primary="name">
2916                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2917                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2918                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2919                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2920                 </fields>
2921                 <links/>
2922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2923             <actions>
2924                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2925                 <retrieve/>
2926                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2927                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2928             </actions>
2929         </permacrud>
2930         </class>
2931
2932         <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">
2933                 <fields oils_persist:primary="alias">
2934                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2935                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2936                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2937                 </fields>
2938                 <links>
2939                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2940                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2941                 </links>
2942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2943             <actions>
2944                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2945                 <retrieve/>
2946                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2947                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2948             </actions>
2949         </permacrud>
2950         </class>
2951
2952         <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">
2953                 <fields oils_persist:primary="name">
2954                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2955                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2956                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2957                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2958                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2959                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2960                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2961                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2962                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2963                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2964                 </fields>
2965                 <links>
2966                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2967                 </links>
2968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2969             <actions>
2970                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2971                 <retrieve/>
2972                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2973                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2974             </actions>
2975         </permacrud>
2976         </class>
2977
2978         <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">
2979                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2980                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2981                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2982                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2983                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2984                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2985                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2986                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2987                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2988                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2989                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2990                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2991                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2992                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2993                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2994                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2995                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2996                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2997                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2998                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2999                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
3000                 </fields>
3001                 <links>
3002                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
3003                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
3004                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
3005                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
3006                 </links>
3007         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3008             <actions>
3009                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
3010                 <retrieve/>
3011                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
3012                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
3013             </actions>
3014         </permacrud>
3015         </class>
3016
3017         <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">
3018                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
3019                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3020                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
3021                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link" config_field="true"/>
3022                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
3023                 </fields>
3024                 <links>
3025                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
3026                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
3027                 </links>
3028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3029             <actions>
3030                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3031                 <retrieve/>
3032                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3033                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3034             </actions>
3035         </permacrud>
3036         </class>
3037
3038         <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">
3039                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
3040                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
3041                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3042                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
3043                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
3044                         <field reporter:label="Owning Lib to Patron Home Lib Proximity" name="owning_lib_to_home_lib_prox" reporter:datatype="int" />
3045                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
3046                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
3047                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
3048                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
3049                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
3050                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
3051                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
3052                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
3053                 </fields>
3054                 <links>
3055                 </links>
3056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3057                         <actions>
3058                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3059                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3060                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3061                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3062                         </actions>
3063                 </permacrud>
3064         </class>
3065         <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">
3066                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
3067                         <field name="id" reporter:datatype="id" />
3068                         <field name="name" reporter:datatype="text"/>
3069                         <field name="xpath" reporter:datatype="text"/>
3070                         <field name="format" reporter:datatype="link"/>
3071                         <field name="first_word" reporter:datatype="bool" />
3072                 </fields>
3073                 <links/>
3074         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3075             <actions>
3076                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
3077                 <retrieve/>
3078                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
3079                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
3080             </actions>
3081         </permacrud>
3082         </class>
3083         <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">
3084                 <fields oils_persist:primary="code" oils_persist:sequence="">
3085                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3086                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
3087                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3088                 </fields>
3089                 <links/>
3090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3091             <actions>
3092                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3093                 <retrieve/>
3094                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3095                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3096             </actions>
3097         </permacrud>
3098         </class>
3099         <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">
3100                 <fields oils_persist:primary="code" oils_persist:sequence="">
3101                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3102                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3103                 </fields>
3104                 <links/>
3105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3106             <actions>
3107                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3108                 <retrieve/>
3109                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3110                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3111             </actions>
3112         </permacrud>
3113         </class>
3114     <class id="acmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_course" oils_persist:tablename="asset.course_module_course" reporter:label="Course">
3115         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_id_seq">
3116             <field reporter:label="ID" name="id" reporter:datatype="id" />
3117             <field reporter:label="Course Name" name="name" reporter:datatype="text" oils_obj:required="true" />
3118             <field reporter:label="Course Number" name="course_number" reporter:datatype="text" oils_obj:required="true" />
3119             <field reporter:label="Section Number" name="section_number" reporter:datatype="text" />
3120             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3121             <field reporter:label="Course Members" name="members" oils_persist:virtual="true" reporter:datatype="link" />
3122             <field reporter:label="Course Materials" name="materials" oils_persist:virtual="true" reporter:datatype="link" />
3123             <field reporter:label="Is Archived?" name="is_archived" reporter:datatype="bool" />
3124                         <field reporter:label="Terms Taught" name="terms_map" oils_persist:virtual="true" reporter:datatype="link" config_field="true" />
3125         </fields>
3126         <links>
3127             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3128             <link field="members" reltype="has_many" key="course" map="" class="acmcu" />
3129             <link field="materials" reltype="has_many" key="course" map="" class="acmcm" />
3130                         <link field="terms_map" reltype="has_many" key="course" map="" class="acmtcm" />
3131         </links>
3132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3133             <actions>
3134                 <create permission="MANAGE_RESERVES" context_field="owning_lib"/>
3135                 <retrieve/>
3136                 <update permission="MANAGE_RESERVES" context_field="owning_lib"/>
3137                 <delete permission="MANAGE_RESERVES" context_field="owning_lib"/>
3138             </actions>
3139         </permacrud>
3140     </class>
3141     <class id="acmcu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_course_users" oils_persist:tablename="asset.course_module_course_users" reporter:label="Course Users">
3142         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_users_id_seq">
3143             <field reporter:label="ID" name="id" reporter:datatype="id" />
3144             <field reporter:label="Course" name="course" reporter:datatype="link" />
3145             <field reporter:label="User" name="usr" reporter:datatype="link" />
3146             <field reporter:label="User Role" name="usr_role" reporter:datatype="link" />
3147         </fields>
3148         <links>
3149             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3150             <link field="usr" reltype="has_a" key="id" map="" class="au" />
3151             <link field="usr_role" reltype="has_a" key="id" map="" class="acmr" />
3152         </links>
3153         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3154             <actions>
3155                 <create permission="MANAGE_RESERVES">
3156                                         <context link="course" field="owning_lib" />
3157                 </create>
3158                 <retrieve/>
3159                 <update permission="MANAGE_RESERVES">
3160                                         <context link="course" field="owning_lib" />
3161                 </update>
3162                 <delete permission="MANAGE_RESERVES">
3163                                         <context link="course" field="owning_lib" />
3164                 </delete>
3165             </actions>
3166         </permacrud>
3167     </class>
3168     <class id="acmcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_course_materials" oils_persist:tablename="asset.course_module_course_materials" reporter:label="Course Materials" oils_persist:field_safe="true">
3169         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_materials_id_seq">
3170             <field reporter:label="ID" name="id" reporter:datatype="id" />
3171             <field reporter:label="Course" name="course" reporter:datatype="link" />
3172             <field reporter:label="Item" name="item" reporter:datatype="link" />
3173             <field reporter:label="Record" name="record" reporter:datatype="link" />
3174             <field reporter:label="Record is temporary?" name="temporary_record" reporter:datatype="bool" />
3175             <field reporter:label="Item Relationship" name="relationship" reporter:datatype="text" />
3176             <field reporter:label="Original Status" name="original_status" reporter:datatype="link" />
3177             <field reporter:label="Original Circ Modifier" name="original_circ_modifier" reporter:datatype="link" />
3178             <field reporter:label="Original Shelving Location" name="original_location" reporter:datatype="link" />
3179             <field reporter:label="Original Callnumber" name="original_callnumber" reporter:datatype="link" />
3180         </fields>
3181         <links>
3182             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3183             <link field="item" reltype="has_a" key="id" map="" class="acp" />
3184             <link field="record" reltype="has_a" key="id" map="" class="bre" />
3185             <link field="original_callnumber" reltype="has_a" key="id" map="" class="acn" />
3186             <link field="original_status" reltype="has_a" key="id" map="" class="ccs" />
3187             <link field="original_circ_modifier" reltype="has_a" key="code" map="" class="ccm" />
3188             <link field="original_location" reltype="has_a" key="id" map="" class="acpl" />
3189         </links>
3190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3191             <actions>
3192                 <create permission="MANAGE_RESERVES">
3193                                         <context link="course" field="owning_lib" />
3194                 </create>
3195                 <retrieve/>
3196                 <update permission="MANAGE_RESERVES">
3197                                         <context link="course" field="owning_lib" />
3198                 </update>
3199                 <delete permission="MANAGE_RESERVES">
3200                                         <context link="course" field="owning_lib" />
3201                 </delete>
3202             </actions>
3203         </permacrud>
3204     </class>
3205         <class id="acmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_term" oils_persist:tablename="asset.course_module_term" reporter:label="Term" oils_persist:field_safe="true">
3206                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_id_seq">
3207                         <field reporter:label="Term ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3208                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3209             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3210                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3211                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3212                         <field reporter:label="Courses" name="courses" reporter:datatype="link" oils_persist:virtual="true"/>
3213                         <field reporter:label="Course Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
3214                 </fields>
3215                 <links>
3216             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3217                         <link field="courses" reltype="has_many" key="term" map="course" class="acmtcm"/>
3218                         <link field="maps" reltype="has_many" key="term" map="" class="acmtcm"/>
3219                 </links>
3220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3221                         <actions>
3222                                 <create permission="MANAGE_RESERVES" context_field="owning_lib" />
3223                                 <retrieve/>
3224                                 <update permission="MANAGE_RESERVES" context_field="owning_lib" />
3225                                 <delete permission="MANAGE_RESERVES" context_field="owning_lib" />
3226                         </actions>
3227                 </permacrud>
3228         </class>
3229     <class id="acmtcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_term_course_map" oils_persist:tablename="asset.course_module_term_course_map" reporter:label="Course Term Map" oils_persist:field_safe="true">
3230         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_course_map_id_seq">
3231             <field reporter:label="Course Term Map ID" name="id" reporter:datatype="id"/>
3232             <field reporter:label="Term" name="term" oils_obj:required="true" reporter:datatype="link"/>
3233             <field reporter:label="Course" name="course" reporter:datatype="link" oils_obj:required="true"/>
3234         </fields>
3235         <links>
3236             <link field="term" reltype="has_a" key="id" map="" class="acmt"/>
3237             <link field="course" reltype="has_a" key="id" map="" class="acmc"/>
3238         </links>
3239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3240             <actions>
3241                 <create permission="MANAGE_RESERVES">
3242                                         <context link="course" field="owning_lib" />
3243                 </create>
3244                 <retrieve/>
3245                 <update permission="MANAGE_RESERVES">
3246                                         <context link="course" field="owning_lib" />
3247                 </update>
3248                 <delete permission="MANAGE_RESERVES">
3249                                         <context link="course" field="owning_lib" />
3250                 </delete>
3251             </actions>
3252         </permacrud>
3253     </class>
3254         <class id="acmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_role" oils_persist:tablename="asset.course_module_role" reporter:label="Course Role" oils_persist:field_safe="true">
3255                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_role_id_seq">
3256                         <field reporter:label="Role ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3257                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3258             <field reporter:label="OPAC Viewable?" name="is_public" reporter:datatype="bool" />
3259                 </fields>
3260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3261                         <actions>
3262                                 <create permission="MANAGE_RESERVES" global_required="true" />
3263                                 <retrieve/>
3264                                 <update permission="MANAGE_RESERVES" global_required="true" />
3265                                 <delete permission="MANAGE_RESERVES" global_required="true" />
3266                         </actions>
3267                 </permacrud>
3268         </class>
3269         
3270     <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">
3271         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3272             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3273             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3274             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3275             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3276         </fields>
3277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3278             <actions>
3279                 <retrieve/>
3280             </actions>
3281         </permacrud>
3282     </class>
3283         <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">
3284                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3285                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3286                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3287                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3288                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3289                 </fields>
3290                 <links>
3291                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3292                 </links>
3293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3294             <actions>
3295                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3296                 <retrieve/>
3297                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3298                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3299             </actions>
3300         </permacrud>
3301         </class>
3302         <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">
3303                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3304                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3305                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3306                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3307                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3308                 </fields>
3309                 <links>
3310                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3311                 </links>
3312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3313             <actions>
3314                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3315                 <retrieve/>
3316                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3317                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3318             </actions>
3319         </permacrud>
3320         </class>
3321         <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">
3322                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3323                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3324                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3325                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3326                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3327                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3328                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3329                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3330                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3331                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3332                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3333                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3334                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3335                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3336                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3337                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3338                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3339                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3340                 </fields>
3341                 <links>
3342                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3343                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3344                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3345                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3346                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3347                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3348                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3349                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3350                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3351                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3352                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3353                 </links>
3354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3355             <actions>
3356                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3357                 <retrieve/>
3358                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3359                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3360             </actions>
3361         </permacrud>
3362         </class>
3363         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3364                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3365                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3366                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3367                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3368                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3369                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3370                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3371                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3372                 </fields>
3373                 <links>
3374                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3375                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3376         </links>
3377         </class>
3378         <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">
3379                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3380                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3381                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3382                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3383                 </fields>
3384                 <links>
3385                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3386                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3387                 </links>
3388         </class>
3389         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3390                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3391                         <field name="id" reporter:datatype="id" />
3392                         <field name="value" oils_persist:i18n="true" />
3393                 </fields>
3394                 <links/>
3395         </class>
3396         <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">
3397                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3398                         <field name="balance_owed" reporter:datatype="money" />
3399                         <field name="total_owed" reporter:datatype="money" />
3400                         <field name="total_paid" reporter:datatype="money" />
3401                         <field name="usr" reporter:datatype="link"/>
3402                 </fields>
3403                 <links>
3404                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3405         </links>
3406         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3407             <actions>
3408                 <retrieve permission="VIEW_USER">
3409                     <context link="usr" field="home_ou"/>
3410                 </retrieve>
3411             </actions>
3412         </permacrud>
3413         </class>
3414         <class id="mowbus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_with_balance_user_summary" oils_persist:tablename="money.open_with_balance_usr_summary" reporter:label="Open User Summary for transactions with balances">
3415                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3416                         <field name="balance_owed" reporter:datatype="money" />
3417                         <field name="total_owed" reporter:datatype="money" />
3418                         <field name="total_paid" reporter:datatype="money" />
3419                         <field name="usr" reporter:datatype="link"/>
3420                 </fields>
3421                 <links>
3422                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3423         </links>
3424         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3425             <actions>
3426                 <retrieve permission="VIEW_USER">
3427                     <context link="usr" field="home_ou"/>
3428                 </retrieve>
3429             </actions>
3430         </permacrud>
3431         </class>
3432         <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">
3433                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3434                         <field name="collector" />
3435                         <field name="enter_time" reporter:datatype="timestamp"/>
3436                         <field name="id" reporter:datatype="id" />
3437                         <field name="location" reporter:datatype="link"/>
3438                         <field name="usr" reporter:datatype="link"/>
3439                 </fields>
3440                 <links>
3441                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3442                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3443                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3444                 </links>
3445         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3446             <actions>
3447                 <create permission="money.collections_tracker.create" context_field="location"/>
3448                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3449                 <delete permission="money.collections_tracker.create" context_field="location"/>
3450             </actions>
3451         </permacrud>
3452         </class>
3453         <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">
3454                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3455                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3456                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3457                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3458                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3459                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3460                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3461                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3462                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3463                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3464                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3465                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3466                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3467                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3468                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3469                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3470                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3471                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3472                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3473                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3474                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3475                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3476                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3477                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3478                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3479                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3480                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3481                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3482                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3483                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3484                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3485                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3486                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3487                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3488                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3489                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3490                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3491                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3492                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3493                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3494                 </fields>
3495                 <links>
3496                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3497                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3498                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3499                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3500                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3501                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3502                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3503                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3504                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3505                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3506                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3507                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3508                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3509                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3510                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3511                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3512                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3513                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3514                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3515                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3516                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3517                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3518                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3519                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3520                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3521                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3522                 </links>
3523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3524             <actions>
3525                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3526                 <retrieve/>
3527                 <update permission="UPDATE_MARC" global_required="true"/>
3528                 <!-- 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. -->
3529                 <delete permission="DELETE_RECORD" global_required="true"/>
3530             </actions>
3531         </permacrud>
3532         </class>
3533         <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">
3534                 <fields oils_persist:primary="id">
3535                         <field name="dow_0_close" />
3536                         <field name="dow_0_open" />
3537                         <field name="dow_1_close" />
3538                         <field name="dow_1_open" />
3539                         <field name="dow_2_close" />
3540                         <field name="dow_2_open" />
3541                         <field name="dow_3_close" />
3542                         <field name="dow_3_open" />
3543                         <field name="dow_4_close" />
3544                         <field name="dow_4_open" />
3545                         <field name="dow_5_close" />
3546                         <field name="dow_5_open" />
3547                         <field name="dow_6_close" />
3548                         <field name="dow_6_open" />
3549                         <field name="id" reporter:datatype="id" />
3550                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3551                 </fields>
3552                 <links>
3553                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3554                 </links>
3555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3556             <actions>
3557                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3558                 <retrieve/>
3559                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3560                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3561             </actions>
3562         </permacrud>
3563         </class>
3564         <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">
3565                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3566                         <field name="id" reporter:datatype="id" />
3567                         <field name="record" reporter:datatype="link"/>
3568                         <field name="label" reporter:datatype="text"/>
3569                         <field name="label_sortkey" reporter:datatype="text"/>
3570                         <field name="deleted" reporter:datatype="bool"/>
3571                 </fields>
3572                 <links>
3573                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3574                 </links>
3575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3576             <actions>
3577                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3578                 <retrieve/>
3579                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3580                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3581             </actions>
3582         </permacrud>
3583         </class>
3584         <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">
3585                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3586                         <field name="id" reporter:datatype="id" />
3587                         <field name="target_copy" reporter:datatype="link" />
3588                         <field name="part" reporter:datatype="link"/>
3589                 </fields>
3590                 <links>
3591                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3592                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3593                 </links>
3594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3595             <actions>
3596                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3597                 <retrieve/>
3598                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3599                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3600             </actions>
3601         </permacrud>
3602         </class>
3603     <class  id="aecc"
3604             controller="open-ils.cstore open-ils.pcrud"
3605             oils_obj:fieldmapper="action::emergency_closing_circulation"
3606             oils_persist:tablename="action.emergency_closing_circulation"
3607             reporter:label="Emergency Closing Circulation Entry"
3608             oils_persist:readonly="true"
3609     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3610         <fields oils_persist:primary="id">
3611             <field name="id" reporter:datatype="id" />
3612             <field name="circulation" reporter:datatype="link" />
3613                         <field name="emergency_closing" reporter:datatype="link"/>
3614             <field name="original_due_date" reporter:datatype="timestamp" />
3615             <field name="process_time" reporter:datatype="timestamp" />
3616         </fields>
3617         <links>
3618             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3619             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3620         </links>
3621         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3622             <actions>
3623                 <retrieve/>
3624             </actions>
3625         </permacrud>
3626     </class>
3627     <class  id="aecr"
3628             controller="open-ils.cstore open-ils.pcrud"
3629             oils_obj:fieldmapper="action::emergency_closing_reservation"
3630             oils_persist:tablename="action.emergency_closing_reservation"
3631             reporter:label="Emergency Closing Reservation Entry"
3632             oils_persist:readonly="true"
3633     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3634         <fields oils_persist:primary="id">
3635             <field name="id" reporter:datatype="id" />
3636             <field name="reservation" reporter:datatype="link" />
3637                         <field name="emergency_closing" reporter:datatype="link"/>
3638             <field name="original_end_time" reporter:datatype="timestamp" />
3639             <field name="process_time" reporter:datatype="timestamp" />
3640         </fields>
3641         <links>
3642             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3643             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3644         </links>
3645         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3646             <actions>
3647                 <retrieve/>
3648             </actions>
3649         </permacrud>
3650     </class>
3651     <class  id="aech"
3652             controller="open-ils.cstore open-ils.pcrud"
3653             oils_obj:fieldmapper="action::emergency_closing_hold"
3654             oils_persist:tablename="action.emergency_closing_hold"
3655             reporter:label="Emergency Closing Hold Entry"
3656             oils_persist:readonly="true"
3657     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3658         <fields oils_persist:primary="id">
3659             <field name="id" reporter:datatype="id" />
3660             <field name="hold" reporter:datatype="link" />
3661                         <field name="emergency_closing" reporter:datatype="link"/>
3662             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3663             <field name="process_time" reporter:datatype="timestamp" />
3664         </fields>
3665         <links>
3666             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3667             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3668         </links>
3669         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3670             <actions>
3671                 <retrieve/>
3672             </actions>
3673         </permacrud>
3674     </class>
3675     <class  id="aecs"
3676             controller="open-ils.cstore open-ils.pcrud"
3677             oils_obj:fieldmapper="action::emergency_closing_status"
3678             oils_persist:tablename="action.emergency_closing_status"
3679             reporter:label="Emergency Closing Status"
3680             oils_persist:readonly="true"
3681     >
3682         <fields oils_persist:primary="id">
3683             <field name="id" reporter:datatype="id" />
3684             <field name="creator" reporter:datatype="link" />
3685             <field name="create_time" reporter:datatype="timestamp" />
3686             <field name="process_start_time" reporter:datatype="timestamp" />
3687             <field name="process_end_time" reporter:datatype="timestamp" />
3688             <field name="last_update_time" reporter:datatype="timestamp" />
3689             <field name="circulations" reporter:datatype="int" />
3690             <field name="circulations_complete" reporter:datatype="int" />
3691             <field name="reservations" reporter:datatype="int" />
3692             <field name="reservations_complete" reporter:datatype="int" />
3693             <field name="holds" reporter:datatype="int" />
3694             <field name="holds_complete" reporter:datatype="int" />
3695         </fields>
3696         <links>
3697             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3698         </links>
3699         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3700             <actions>
3701                 <retrieve/>
3702             </actions>
3703         </permacrud>
3704     </class>
3705     <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">
3706         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3707             <field name="id" reporter:datatype="id" />
3708             <field name="creator" reporter:datatype="link" />
3709             <field name="create_time" reporter:datatype="timestamp" />
3710             <field name="process_start_time" reporter:datatype="timestamp" />
3711             <field name="process_end_time" reporter:datatype="timestamp" />
3712             <field name="last_update_time" reporter:datatype="timestamp" />
3713             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3714             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3715             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3716             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3717             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3718         </fields>
3719         <links>
3720             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3721             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3722             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3723             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3724             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3725             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3726         </links>
3727         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3728             <actions>
3729                 <create permission="EMERGENCY_CLOSING">
3730                     <context link="closing" field="org_unit" />
3731                 </create>
3732                 <retrieve/>
3733                 <update permission="EMERGENCY_CLOSING">
3734                     <context link="closing" field="org_unit" />
3735                 </update>
3736                 <delete permission="EMERGENCY_CLOSING">
3737                     <context link="closing" field="org_unit" />
3738                 </delete>
3739             </actions>
3740         </permacrud>
3741     </class>
3742         <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">
3743                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3744                         <field name="close_end" reporter:datatype="timestamp" />
3745                         <field name="close_start" reporter:datatype="timestamp" />
3746                         <field name="id" reporter:datatype="id" />
3747                         <field name="org_unit" reporter:datatype="org_unit"/>
3748                         <field name="reason" reporter:datatype="text"/>
3749                         <field name="full_day" reporter:datatype="bool"/>
3750                         <field name="multi_day" reporter:datatype="bool"/>
3751                         <field name="emergency_closing" reporter:datatype="link"/>
3752                 </fields>
3753                 <links>
3754                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3755                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3756                 </links>
3757         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3758             <actions>
3759                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3760                 <retrieve/>
3761                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3762                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3763             </actions>
3764         </permacrud>
3765         </class>
3766         <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">
3767                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3768                         <field name="extended" reporter:datatype="interval"/>
3769                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3770                         <field name="max_renewals" reporter:datatype="int" />
3771                         <field name="name" reporter:datatype="text"/>
3772                         <field name="normal" reporter:datatype="interval"/>
3773                         <field name="shrt" reporter:datatype="interval"/>
3774                         <field name="max_auto_renewals" reporter:datatype="int" />
3775                 </fields>
3776                 <links>
3777                 </links>
3778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3779             <actions>
3780                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3781                 <retrieve/>
3782                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3783                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3784             </actions>
3785         </permacrud>
3786         </class>
3787
3788         <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">
3789                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3790                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3791                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3792             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3793                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3794             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3795                         <field reporter:label="Values" name="values" oils_persist:virtual="true" 
3796                                 reporter:datatype="link" config_field="true"/>
3797                 </fields>
3798                 <links>
3799             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3800                         <link field="values" reltype="has_many" key="hard_due_date" map="" class="chddv"/>
3801                 </links>
3802                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3803             <actions>
3804                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3805                 <retrieve/>
3806                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3807                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3808             </actions>
3809                 </permacrud>
3810         </class>
3811
3812         <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">
3813                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3814                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3815                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link" config_field="true"/>
3816                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3817             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3818                 </fields>
3819                 <links>
3820                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3821                 </links>
3822                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3823             <actions>
3824                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3825                 <retrieve/>
3826                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3827                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3828             </actions>
3829                 </permacrud>
3830         </class>
3831
3832         <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">
3833                 <fields oils_persist:primary="id" oils_persist:sequence="">
3834                         <field name="balance_owed" reporter:datatype="money"/>
3835                         <field name="id" reporter:datatype="id" />
3836                         <field name="last_billing_note" reporter:datatype="text"/>
3837                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3838                         <field name="last_billing_type" reporter:datatype="text"/>
3839                         <field name="last_payment_note" reporter:datatype="text"/>
3840                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3841                         <field name="last_payment_type" reporter:datatype="text"/>
3842                         <field name="total_owed" reporter:datatype="money"/>
3843                         <field name="total_paid" reporter:datatype="money"/>
3844                         <field name="usr" reporter:datatype="link"/>
3845                         <field name="xact_finish" reporter:datatype="timestamp" />
3846                         <field name="xact_start" reporter:datatype="timestamp" />
3847                         <field name="xact_type" reporter:datatype="text"/>
3848                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3849                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3850                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3851                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3852                         <field name="billing_location" reporter:datatype="link"/>
3853                 </fields>
3854                 <links>
3855                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3856                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3857                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3858                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3859                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3860                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3861                 </links>
3862                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3863                         <actions>
3864                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3865                                         <context link="usr" field="home_ou" />
3866                                 </retrieve>
3867                         </actions>
3868                 </permacrud>
3869         </class>
3870         <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">
3871                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3872                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3873                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3874                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3875                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3876                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3877                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3878                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3879                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3880                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3881                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3882                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3883                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3884                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3885                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3886                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3887                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3888                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3889                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3890                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3891                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3892                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3893                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3894                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3895                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3896                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3897                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3898                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3899                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3900                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3901                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
3902                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3903                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3904                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3905                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3906                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3907                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3908                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3909                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3910                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3911                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3912                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3913                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3914                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3915                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3916                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3917                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3918                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3919                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3920                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3921                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3922                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3923                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3924                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3925                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3926                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3927                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3928                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3929                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
3930                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3931                         <field reporter:label="Name Keyword internal tsvector" name="name_kw_tsvector" reporter:datatype="text"/>
3932                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3933                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3934                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3935                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3936                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3937                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3938                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3939                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3940                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3941                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3942                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3943                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3944                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3945                 </fields>
3946                 <links>
3947                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3948                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3949                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3950                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3951                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3952                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3953                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3954                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3955                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3956                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3957                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3958                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
3959                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3960                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3961                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3962                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3963                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3964                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3965                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3966                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3967                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3968                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3969                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3970                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3971                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3972                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3973                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3974                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3975                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3976                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3977                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3978                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3979                 </links>
3980                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3981                         <actions>
3982                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
3983                         </actions>
3984                 </permacrud>
3985         </class>
3986         <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">
3987                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3988                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
3989                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3990                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3991                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3992                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3993                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3994                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3995                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3996         </fields>
3997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3998                         <actions>
3999                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4000                                 <retrieve/>
4001                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4002                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4003                         </actions>
4004                 </permacrud>
4005         </class>
4006         <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">
4007                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
4008                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4009                         <field name="usr" reporter:label="User" reporter:datatype="link" />
4010                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
4011                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
4012         </fields>
4013         <links>
4014                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4015                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
4016                 </links>
4017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4018                         <actions>
4019                                 <retrieve permission="RUN_REPORTS">
4020                                         <context link="usr" field="home_ou" />
4021                                 </retrieve>
4022                         </actions>
4023                 </permacrud>
4024         </class>
4025         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
4026                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
4027                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4028                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
4029                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
4030                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
4031                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
4032                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
4033         </fields>
4034         <links>
4035                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
4036                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
4037                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
4038                 </links>
4039                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4040                         <actions>
4041                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
4042                                         <context link="usr" field="home_ou" />
4043                                         <context link="ws" field="owning_lib" />
4044                                 </retrieve>
4045                                 <create permission="ADMIN_TOOLBAR" context_field="org">
4046                                         <context link="usr" field="home_ou" />
4047                                         <context link="ws" field="owning_lib" />
4048                                 </create>
4049                                 <update permission="ADMIN_TOOLBAR" context_field="org">
4050                                         <context link="usr" field="home_ou" />
4051                                         <context link="ws" field="owning_lib" />
4052                                 </update>
4053                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
4054                                         <context link="usr" field="home_ou" />
4055                                         <context link="ws" field="owning_lib" />
4056                                 </delete>
4057                         </actions>
4058                 </permacrud>
4059         </class>
4060         <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">
4061                 <fields oils_persist:primary="name">
4062                         <field name="name" reporter:datatype="text"/>
4063                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4064                 </fields>
4065                 <links/>
4066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4067                         <actions>
4068                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4069                                 <retrieve/>
4070                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4071                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4072                         </actions>
4073                 </permacrud>
4074         </class>
4075         <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">
4076                 <fields oils_persist:primary="name">
4077                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
4078                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
4079                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
4080                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
4081                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
4082                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
4083                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
4084                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
4085                 </fields>
4086                 <links>
4087                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
4088                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4089                 </links>
4090                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4091                         <actions>
4092                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4093                                 <retrieve/>
4094                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4095                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4096                         </actions>
4097                 </permacrud>
4098         </class>
4099         <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">
4100                 <fields oils_persist:primary="name">
4101                         <field name="name" reporter:datatype="text"/>
4102                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4103                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4104                         <field name="datatype" reporter:datatype="text"/>
4105                         <field name="view_perm" reporter:datatype="link"/>
4106                         <field name="update_perm" reporter:datatype="link"/>
4107                         <field name="fm_class" reporter:datatype="text"/>
4108                         <field name="grp" reporter:datatype="link"/>
4109                 </fields>
4110                 <links>
4111                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
4112                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
4113                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
4114                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4115                 </links>
4116                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4117                         <actions>
4118                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4119                                 <retrieve/>
4120                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4121                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4122                         </actions>
4123                 </permacrud>
4124         </class>
4125         <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">
4126                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
4127                         <field name="id" />
4128                         <field name="name"  reporter:datatype="text"/>
4129                         <field name="org_unit" reporter:datatype="org_unit"/>
4130                         <field name="value"  reporter:datatype="text"/>
4131                 </fields>
4132                 <links>
4133                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4134                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
4135                 </links>
4136         </class>
4137         <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">
4138                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
4139                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4140                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
4141                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
4142                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
4143                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
4144                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
4145                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
4146                 </fields>
4147                 <links>
4148                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4149                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4150                 </links>
4151         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4152             <actions>
4153                 <create permission="CREATE_COPY_NOTE">
4154                     <context link="owning_copy" field="circ_lib"/>
4155                 </create>
4156                 <retrieve permission="VIEW_COPY_NOTES">
4157                     <context link="owning_copy" field="circ_lib"/>
4158                 </retrieve>
4159                 <update permission="UPDATE_COPY_NOTE">
4160                     <context link="owning_copy" field="circ_lib"/>
4161                 </update>
4162                 <delete permission="DELETE_COPY_NOTE">
4163                     <context link="owning_copy" field="circ_lib"/>
4164                 </delete>
4165             </actions>
4166         </permacrud>
4167         </class>
4168         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
4169                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
4170                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
4171                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
4172                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
4173                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4174                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
4175                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
4176                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
4177                 </fields>
4178                 <links>
4179                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4180                 </links>
4181         </class>
4182         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
4183                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
4184                         <field name="fingerprint"  reporter:datatype="text"/>
4185                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
4186                         <field name="master_record" reporter:datatype="link"/>
4187                         <field name="mods"  reporter:datatype="text"/>
4188                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
4189                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4190                 </fields>
4191                 <links>
4192                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
4193                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
4194                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
4195                 </links>
4196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4197                         <actions>
4198                                 <retrieve/>
4199                         </actions>
4200                 </permacrud>
4201         </class>
4202         <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">
4203                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
4204                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4205                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4206                 </fields>
4207                 <links/>
4208         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4209             <actions>
4210                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
4211                 <retrieve/>
4212                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
4213                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
4214             </actions>
4215         </permacrud>
4216         </class>
4217         <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">
4218                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
4219                         <field name="code"  reporter:datatype="text"/>
4220                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
4221                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
4222                 </fields>
4223                 <links/>
4224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4225             <actions>
4226                 <create permission="CREATE_PERM" global_required="true"/>
4227                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
4228                 <update permission="UPDATE_PERM" global_required="true"/>
4229                 <delete permission="DELETE_PERM" global_required="true"/>
4230             </actions>
4231         </permacrud>
4232         </class>
4233         <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">
4234                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
4235                         <field name="id" reporter:datatype="id" />
4236                         <field name="metarecord" reporter:datatype="link"/>
4237                         <field name="source" reporter:datatype="link"/>
4238                 </fields>
4239                 <links>
4240                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4241                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
4242                 </links>
4243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4244                         <actions>
4245                                 <retrieve/>
4246                         </actions>
4247                 </permacrud>
4248         </class>
4249         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4250                         oils_obj:fieldmapper="metabib::display_entry" 
4251                         oils_persist:tablename="metabib.display_entry" 
4252                         oils_persist:field_safe="true"
4253                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4254                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4255                         <field name="id" reporter:datatype="id" />
4256                         <field name="field" reporter:datatype="link"/>
4257                         <field name="source" reporter:datatype="link"/>
4258                         <field name="value"  reporter:datatype="text"/>
4259                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4260                 </fields>
4261                 <links>
4262                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4263                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4264                 </links>
4265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4266                         <actions>
4267                                 <retrieve/>
4268                         </actions>
4269                 </permacrud>
4270         </class>
4271         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4272                 oils_persist:tablename="metabib.flat_display_entry"
4273                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4274                 oils_persist:field_safe="true"
4275                 reporter:label="Flat Display Entry" 
4276                 oils_persist:readonly="true">
4277                 <fields>
4278                         <field name="source" reporter:datatype="id" />
4279                         <field name="name" reporter:datatype="text"/>
4280                         <field name="multi" reporter:datatype="bool"/>
4281                         <field name="label" reporter:datatype="text"/>
4282                         <field name="field" reporter:datatype="link"/>
4283                         <field name="value" reporter:datatype="text"/>
4284                 </fields>
4285                 <links>
4286                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4287                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4288                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4289                 </links>
4290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4291                         <actions>
4292                                 <retrieve/>
4293                         </actions>
4294                 </permacrud>
4295         </class>
4296         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4297                 oils_persist:tablename="metabib.compressed_display_entry"
4298                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4299                 oils_persist:field_safe="true"
4300                 reporter:label="Compressed Display Entry" 
4301                 oils_persist:readonly="true">
4302                 <fields>
4303                         <field name="source" reporter:datatype="id" />
4304                         <field name="name" reporter:datatype="text"/>
4305                         <field name="multi" reporter:datatype="bool"/>
4306                         <field name="label" reporter:datatype="text"/>
4307                         <field name="field" reporter:datatype="link"/>
4308                         <field name="value" reporter:datatype="text"/>
4309                 </fields>
4310                 <links>
4311                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4312                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4313                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4314                 </links>
4315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4316                         <actions>
4317                                 <retrieve/>
4318                         </actions>
4319                 </permacrud>
4320         </class>
4321         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4322                 oils_persist:tablename="metabib.wide_display_entry"
4323                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4324                 oils_persist:field_safe="true"
4325                 reporter:label="Wide Display Entry" 
4326                 oils_persist:readonly="true">
4327                 <fields oils_persist:primary="source">
4328                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4329                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4330                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4331                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4332                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4333                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4334                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4335                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4336                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4337                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4338                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4339                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4340                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4341                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4342                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4343                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4344                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4345                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4346                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4347                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4348                 </fields>
4349                 <links>
4350                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4351                 </links>
4352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4353                         <actions>
4354                                 <retrieve/>
4355                         </actions>
4356                 </permacrud>
4357         </class>
4358
4359         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4360                 oils_persist:tablename="config.display_field_map"
4361                 oils_obj:fieldmapper="config::display_field_map"
4362                 oils_persist:field_safe="true"
4363                 reporter:label="Display Field Map">
4364                 <fields oils_persist:primary="name">
4365                         <field name="name" reporter:datatype="text"/>
4366                         <field name="field" reporter:datatype="link"/>
4367                         <field name="multi" reporter:datatype="bool"/>
4368                 </fields>
4369                 <links>
4370                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4371                 </links>
4372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4373                         <actions>
4374                                 <retrieve/>
4375                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4376                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4377                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4378                         </actions>
4379                 </permacrud>
4380         </class>
4381
4382         <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">
4383                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4384                         <field name="id" reporter:datatype="id" />
4385                         <field name="field" reporter:datatype="link"/>
4386                         <field name="source" reporter:datatype="link"/>
4387                         <field name="value"  reporter:datatype="text"/>
4388                 </fields>
4389                 <links>
4390                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4391                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4392                 </links>
4393         </class>
4394         <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">
4395                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4396                         <field name="id" reporter:datatype="id" />
4397                         <field name="value" reporter:datatype="text"/>
4398                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4399                 </fields>
4400                 <links>
4401                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4402                 </links>
4403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4404                         <actions>
4405                                 <retrieve/>
4406                         </actions>
4407                 </permacrud>
4408         </class>
4409         <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">
4410                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4411                         <field name="id" reporter:datatype="id" />
4412                         <field name="entry" reporter:datatype="link"/>
4413                         <field name="def" reporter:datatype="link"/>
4414                         <field name="source" reporter:datatype="link"/>
4415                 </fields>
4416                 <links>
4417                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4418                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4419                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4420                 </links>
4421         </class>
4422         <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">
4423                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4424                         <field name="id" reporter:datatype="id" />
4425                         <field name="entry" reporter:datatype="link"/>
4426                         <field name="simple_heading" reporter:datatype="link"/>
4427                 </fields>
4428                 <links>
4429                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4430                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4431                 </links>
4432         </class>
4433         <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">
4434                 <oils_persist:source_definition><![CDATA[
4435                         SELECT * FROM metabib.author_field_entry
4436                                                 UNION ALL
4437                         SELECT * FROM metabib.keyword_field_entry
4438                                                 UNION ALL
4439                         SELECT * FROM metabib.identifier_field_entry
4440                                                 UNION ALL
4441                         SELECT * FROM metabib.title_field_entry
4442                                                 UNION ALL
4443                         SELECT * FROM metabib.subject_field_entry
4444                                                 UNION ALL
4445                         SELECT * FROM metabib.series_field_entry
4446                 ]]></oils_persist:source_definition>
4447                 <fields>
4448                         <field name="field" reporter:datatype="link"/>
4449                         <field name="id" reporter:datatype="id" />
4450                         <field name="source" reporter:datatype="link"/>
4451                         <field name="value"  reporter:datatype="text"/>
4452                 </fields>
4453                 <links>
4454                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4455                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4456                 </links>
4457         </class>
4458         <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">
4459                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4460                         <field name="field" reporter:datatype="link"/>
4461                         <field name="id" reporter:datatype="id" />
4462                         <field name="source" reporter:datatype="link"/>
4463                         <field name="value"  reporter:datatype="text"/>
4464                 </fields>
4465                 <links>
4466                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4467                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4468                 </links>
4469         </class>
4470         <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">
4471                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4472                         <field name="accepting_usr" reporter:datatype="link"/>
4473                         <field name="amount" reporter:datatype="money" />
4474                         <field name="amount_collected" reporter:datatype="money" />
4475                         <field name="cash_drawer" reporter:datatype="link"/>
4476                         <field name="id" reporter:datatype="id" />
4477                         <field name="note"  reporter:datatype="text"/>
4478                         <field name="payment_ts" reporter:datatype="timestamp"/>
4479                         <field name="xact" reporter:datatype="link"/>
4480                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4481                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4482                 </fields>
4483                 <links>
4484                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4485                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4486                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4487                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4488                 </links>
4489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4490             <actions>
4491                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4492                     <context link="xact" jump="usr" field="home_ou"/>
4493                 </retrieve>
4494                         </actions>
4495                 </permacrud>
4496         </class>
4497         <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">
4498                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4499                         <field name="accepting_usr" reporter:datatype="link"/>
4500                         <field name="amount" reporter:datatype="money" />
4501                         <field name="amount_collected" reporter:datatype="money" />
4502                         <field name="id" reporter:datatype="id" />
4503                         <field name="note"  reporter:datatype="text"/>
4504                         <field name="payment_ts" reporter:datatype="timestamp"/>
4505                         <field name="xact" reporter:datatype="link"/>
4506                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4507                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4508                 </fields>
4509                 <links>
4510                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4511                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4512                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4513                 </links>
4514         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4515             <actions>
4516                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4517                     <context link="xact" jump="usr" field="home_ou"/>
4518                 </retrieve>
4519                         </actions>
4520                 </permacrud>
4521         </class>
4522         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4523                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4524                         <field name="accepting_usr" reporter:datatype="link"/>
4525                         <field name="amount" reporter:datatype="money" />
4526                         <field name="amount_collected" reporter:datatype="money" />
4527                         <field name="id" reporter:datatype="id" />
4528                         <field name="note"  reporter:datatype="text"/>
4529                         <field name="payment_ts" reporter:datatype="timestamp"/>
4530                         <field name="xact" reporter:datatype="link"/>
4531                         <field name="billing" reporter:datatype="link"/>
4532                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4533                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4534                 </fields>
4535                 <links>
4536                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4537                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4538                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4539                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4540                 </links>
4541         </class>
4542         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4543                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4544                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4545                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4546                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4547                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4548                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4549                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4550                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4551                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4552                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4553                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4554                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4555                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4556                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4557                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4558                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4559                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4560                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4561                 </fields>
4562                 <links>
4563                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4564                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4565                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4566                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4567                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4568                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4569                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4570                 </links>
4571         </class>
4572
4573         <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">
4574                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4575                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4576                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4577                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4578                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4579                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4580                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4581                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4582                 </fields>
4583                 <links/>
4584         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4585             <actions>
4586                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4587                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4588                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4589                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4590             </actions>
4591         </permacrud>
4592         </class>
4593         <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">
4594                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4595                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4596                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4597                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4598                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4599                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4600                 </fields>
4601                 <links>
4602                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4603                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4604                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4605         </links>
4606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4607             <actions>
4608                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4609                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4610                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4611                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4612             </actions>
4613         </permacrud>
4614         </class>
4615         <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="Item Status" oils_persist:field_safe="true">
4616                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4617                         <field name="holdable" reporter:datatype="bool" reporter:label="Holdable"/>
4618                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4619                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
4620                         <field name="opac_visible" reporter:datatype="bool" reporter:label="OPAC Visible"/>
4621             <field name="copy_active" reporter:datatype="bool" reporter:label="Sets Item Active"/>
4622             <field name="restrict_copy_delete" reporter:datatype="bool" reporter:label="Restrict Deletion"/>
4623             <field name="is_available" reporter:datatype="bool" reporter:label="Available"/>
4624             <field name="hopeless_prone" reporter:datatype="bool" reporter:label="Prone to Hopeless Holds?"/>
4625                 </fields>
4626                 <links/>
4627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4628             <actions>
4629                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4630                 <retrieve/>
4631                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4632                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4633             </actions>
4634         </permacrud>
4635         </class>
4636         <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">
4637                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4638                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4639                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4640                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4641                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4642                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4643                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4644                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4645                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4646                 </fields>
4647                 <links>
4648                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4649                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4650                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4651                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4652                 </links>
4653                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4654                         <actions>
4655                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4656                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4657                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4658                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4659                         </actions>
4660                 </permacrud>
4661         </class>
4662         <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">
4663                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4664                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4665                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4666                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4667                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4668                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4669                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4670                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4671                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4672                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4673                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4674                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4675                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4676                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4677                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4678                 </fields>
4679                 <links>
4680                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4681                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4682                 </links>
4683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4684                         <actions>
4685                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4686                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4687                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4688                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4689                         </actions>
4690                 </permacrud>
4691         </class>
4692         <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">
4693                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4694                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4695                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4696                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4697                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4698                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4699                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4700                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4701                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4702                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4703                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4704                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4705                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4706                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4707                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4708                 </fields>
4709                 <links>
4710                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4711                 </links>
4712                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4713                         <actions>
4714                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4715                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4716                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4717                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4718                         </actions>
4719                 </permacrud>
4720         </class>
4721
4722
4723         <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">
4724                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4725                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4726                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4727                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4728                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4729                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4730                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4731                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4732                 </fields>
4733                 <links>
4734                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4735                 </links>
4736         </class>
4737
4738         <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">
4739                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4740                         <field name="call_number" />
4741                         <field name="create_date" reporter:datatype="timestamp"/>
4742                         <field name="creator" reporter:datatype="link"/>
4743                         <field name="id" reporter:datatype="id" />
4744                         <field name="pub" reporter:datatype="bool"/>
4745                         <field name="title"  reporter:datatype="text"/>
4746                         <field name="value"  reporter:datatype="text"/>
4747                 </fields>
4748                 <links>
4749                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4750                 </links>
4751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4752             <actions>
4753                 <create permission="CREATE_VOLUME_NOTE">
4754                     <context link="call_number" field="owning_lib"/>
4755                 </create>
4756                 <retrieve permission="VIEW_VOLUME_NOTES">
4757                     <context link="call_number" field="owning_lib"/>
4758                 </retrieve>
4759                 <update permission="UPDATE_VOLUME_NOTE">
4760                     <context link="call_number" field="owning_lib"/>
4761                 </update>
4762                 <delete permission="DELETE_VOLUME_NOTE">
4763                     <context link="call_number" field="owning_lib"/>
4764                 </delete>
4765             </actions>
4766         </permacrud>
4767         </class>
4768         <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">
4769                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4770                         <field name="create_date" reporter:datatype="timestamp"/>
4771                         <field name="creator" reporter:datatype="link"/>
4772                         <field name="edit_date" reporter:datatype="timestamp"/>
4773                         <field name="editor" reporter:datatype="link"/>
4774                         <field name="id" reporter:datatype="id" />
4775                         <field name="record" reporter:datatype="link"/>
4776                         <field name="value" reporter:datatype="text"/>
4777                 </fields>
4778                 <links>
4779                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4780                 </links>
4781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4782             <actions>
4783                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4784                 <retrieve/>
4785                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4786                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4787             </actions>
4788         </permacrud>
4789         </class>
4790         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4791         <oils_persist:source_definition><![CDATA[
4792 SELECT  usr,
4793         SUM(
4794             CASE
4795                 WHEN (
4796                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4797                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4798                 ) THEN 1
4799                 ELSE 0
4800             END
4801         ) AS out,
4802
4803         SUM(
4804             CASE
4805                 WHEN (
4806                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4807                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4808                 ) THEN 1
4809                 ELSE 0
4810             END
4811         ) AS overdue,
4812
4813         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4814         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4815         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4816   FROM  action.circulation
4817   WHERE checkin_time IS NULL
4818   GROUP BY 1
4819         ]]></oils_persist:source_definition>
4820         <fields oils_persist:primary="usr">
4821             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4822             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4823             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4824             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4825             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4826             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4827         </fields>
4828         <links>
4829             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4830         </links>
4831         </class>
4832         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4833         <oils_persist:source_definition><![CDATA[
4834 SELECT  usr,
4835         STRING_AGG(
4836             CASE
4837                 WHEN (
4838                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4839                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4840                 ) THEN id::TEXT
4841                 ELSE '0'
4842             END
4843         ,',') AS out,
4844
4845         STRING_AGG(
4846             CASE
4847                 WHEN (
4848                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4849                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4850                 ) THEN id::TEXT
4851                 ELSE '0'
4852             END
4853         ,',') AS overdue,
4854
4855         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4856         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4857         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4858   FROM  action.circulation
4859   WHERE checkin_time IS NULL
4860   GROUP BY 1
4861         ]]></oils_persist:source_definition>
4862         <fields oils_persist:primary="usr">
4863             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4864             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4865             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4866             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4867             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4868             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4869         </fields>
4870         <links>
4871             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4872         </links>
4873         </class>
4874         <class id="acsp" controller="open-ils.cstore" oils_obj:fieldmapper="action::curbside" oils_persist:tablename="action.curbside" reporter:label="Curbside Appointment Slot">
4875                 <fields oils_persist:primary="id" oils_persist:sequence="action.curbside_id_seq">
4876                         <field reporter:label="Appointment ID" name="id" reporter:datatype="id" />
4877                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
4878                         <field reporter:label="Pickup Library" name="org" reporter:datatype="org_unit"/>
4879                         <field reporter:label="Appointment Date/Time" name="slot" reporter:datatype="timestamp"/>
4880                         <field reporter:label="Staged" name="staged" reporter:datatype="timestamp"/>
4881                         <field reporter:label="Staging Staff" name="stage_staff" reporter:datatype="link"/>
4882                         <field reporter:label="Arrival Date/Time" name="arrival" reporter:datatype="timestamp"/>
4883                         <field reporter:label="Delivery Date/Time" name="delivered" reporter:datatype="timestamp"/>
4884                         <field reporter:label="Delivery Staff" name="delivery_staff" reporter:datatype="link"/>
4885                         <field reporter:label="Notes" name="notes" reporter:datatype="text"/>
4886                 </fields>
4887                 <links>
4888                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4889                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
4890                         <link field="stage_staff" reltype="has_a" key="id" map="" class="au"/>
4891                         <link field="delivery_staff" reltype="has_a" key="id" map="" class="au"/>
4892                 </links>
4893         </class>
4894         <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">
4895                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4896                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4897                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4898                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4899                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4900                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4901                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4902                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4903                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4904                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4905                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4906                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4907                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4908                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4909                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4910                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4911                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4912                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4913                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4914                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4915                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4916                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4917                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4918                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4919                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4920                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4921                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4922                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4923                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4924                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4925                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4926                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4927                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4928                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4929                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4930                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4931                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4932                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4933                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4934                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4935                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4936                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4937                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4938                 </fields>
4939                 <links>
4940                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4941                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4942                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4943                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4944                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4945                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4946                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4947                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4948                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4949                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4950                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4951                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4952                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4953                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4954                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4955                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4956                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4957                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4958                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4959                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4960                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4961                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4962                 </links>
4963                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4964                         <actions>
4965                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4966                         </actions>
4967                 </permacrud>
4968         </class>
4969         <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">
4970                 <fields>
4971                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4972                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4973                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4974                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4975                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4976                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4977                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4978                 </fields>
4979                 <links>
4980                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4981                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4982                 </links>
4983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4984                         <actions>
4985                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4986                         </actions>
4987                 </permacrud>
4988         </class>
4989         <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="false" reporter:label="Combined Aged and Active Circulations (Slim Version)" oils_persist:readonly="true">
4990                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4991                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4992                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4993                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4994                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4995                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4996                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4997                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4998                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4999                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5000                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5001                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5002                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5003                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5004                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5005                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5006                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5007                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5008                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5009                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5010                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5011                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5012                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5013                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5014                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5015                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5016                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5017                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5018                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5019                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5020                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5021                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5022                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5023                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5024                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5025                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5026                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5027                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5028                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5029                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5030                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5031                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5032                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5033                 </fields>
5034                 <links>
5035                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5036                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5037                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5038                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5039                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5040                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5041                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5042                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5043                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5044                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5045                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5046                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5047                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5048                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5049                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5050                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5051                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5052                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5053                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5054                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5055                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5056                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5057                 </links>
5058                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5059                         <actions>
5060                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5061                         </actions>
5062                 </permacrud>
5063         </class>
5064
5065         <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">
5066                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5067                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5068                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5069                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5070                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5071                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5072                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5073                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5074                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5075                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5076                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5077                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5078                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5079                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5080                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5081                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5082                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5083                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5084                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5085                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5086                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5087                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5088                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5089                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5090                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5091                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5092                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5093                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5094                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5095                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5096                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5097                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5098                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5099                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5100                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5101                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5102                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5103                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5104                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5105                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5106                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5107                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5108                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5109                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5110                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5111                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5112                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5113                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5114                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5115                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5116                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5117                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5118                 </fields>
5119                 <links>
5120                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5121                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5122                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5123                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5124                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5125                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5126                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5127                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5128                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5129                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5130                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5131                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5132                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5133                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5134                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5135                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5136                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5137                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5138                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5139                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5140                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5141                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5142                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5143                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5144                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5145                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5146                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5147                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5148                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5149                 </links>
5150                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5151                         <actions>
5152                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5153                         </actions>
5154                 </permacrud>
5155         </class>
5156         <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">
5157                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5158                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5159                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5160                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5161                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5162                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5163                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5164                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5165                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5166                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5167                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5168                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5169                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5170                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5171                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5172                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5173                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5174                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5175                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5176                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5177                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5178                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5179                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5180                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5181                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5182                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5183                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5184                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5185                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5186                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
5187                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5188                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5189                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5190                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5191                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5192                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5193                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5194                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5195                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5196                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5197                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5198                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5199                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5200                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5201                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5202                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5203                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5204                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5205                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5206                 </fields>
5207                 <links>
5208                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5209                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5210                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5211                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5212                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5213                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5214                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5215                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5216                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5217                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5218                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5219                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5220                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5221                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5222                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5223                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5224                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5225                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5226                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5227                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5228                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5229                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
5230                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5231                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5232                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5233                 </links>
5234         </class>
5235         <class id="auch" 
5236                 controller="open-ils.cstore" 
5237                 oils_obj:fieldmapper="action::user_circ_history" 
5238                 oils_persist:tablename="action.usr_circ_history" 
5239                 reporter:label="User Checkout History">
5240                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
5241                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5242                         <!-- prevent reporting on the user that owns the checkout history -->
5243                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
5244                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5245                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
5246                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
5247                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
5248                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
5249                 </fields>
5250                 <links>
5251                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5252                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5253                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
5254                 </links>
5255         </class>
5256         <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">
5257                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
5258                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5259                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5260                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5261                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5262                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5263                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5264                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
5265                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
5266                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
5267                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
5268                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5269                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5270                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5271                 </fields>
5272                 <links>
5273                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5274                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5275                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5276                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5277                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5278                 </links>
5279                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5280                         <actions>
5281                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5282                                 <retrieve permission="VIEW_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5283                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5284                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5285                         </actions>
5286                 </permacrud>
5287         </class>
5288
5289         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5290                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5291                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5292                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5293                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5294                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5295                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5296                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5297                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5298                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5299                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5300                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5301                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5302                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5303                 </fields>
5304                 <links>
5305                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5306                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5307                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5308                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5309                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5310                 </links>
5311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5312                         <actions>
5313                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5314                                 <retrieve permission="VIEW_BOOKING_RESOURCE" context_field='owner'/>
5315                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5316                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5317                         </actions>
5318                 </permacrud>
5319         </class>
5320         
5321         <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">
5322                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5323                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5324                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5325                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5326                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5327                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5328                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5329                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5330                 </fields>
5331                 <links>
5332                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5333                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5334                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5335                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5336                 </links>
5337                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5338                         <actions>
5339                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5340                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5341                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5342                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5343                         </actions>
5344                 </permacrud>
5345         </class>
5346         
5347         <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">
5348                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5349                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5350                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5351                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5352                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5353                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5354                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5355                 </fields>
5356                 <links>
5357                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5358                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5359                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5360                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5361                 </links>
5362                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5363                         <actions>
5364                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5365                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5366                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5367                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5368                         </actions>
5369                 </permacrud>
5370         </class>
5371         
5372         <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">
5373                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5374                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5375                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5376                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5377                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5378                 </fields>
5379                 <links>
5380                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5381                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5382                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5383                 </links>
5384                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5385                         <actions>
5386                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5387                     <context link="resource" field="owner" />
5388                 </create>
5389                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5390                     <context link="resource" field="owner" />
5391                 </retrieve>
5392                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5393                     <context link="resource" field="owner" />
5394                 </update>
5395                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5396                     <context link="resource" field="owner" />
5397                 </delete>
5398                         </actions>
5399                 </permacrud>
5400         </class>
5401         
5402         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5403                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5404                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5405                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5406                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5407                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5408                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5409                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5410                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5411                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5412                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5413                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5414                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5415                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5416                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5417                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5418                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5419                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5420                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5421                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5422                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5423                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5424                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5425                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5426                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5427                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5428                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5429                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5430                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5431                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5432                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5433                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5434                 </fields>
5435                 <links>
5436                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5437                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5438                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5439                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5440                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5441                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5442                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5443                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5444                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5445                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5446                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5447                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5448                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5449                 </links>
5450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5451                         <actions>
5452                                 <create permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5453                                 <retrieve permission="VIEW_BOOKING_RESERVATION" context_field="pickup_lib"/>
5454                                 <update permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5455                                 <delete permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5456                         </actions>
5457                 </permacrud>
5458         </class>
5459         
5460         <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">
5461                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5462                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5463                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5464                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5465                 </fields>
5466                 <links>
5467                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5468                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5469                 </links>
5470                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5471                         <actions>
5472                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5473                                         <context link="reservation" field="pickup_lib"/>
5474                                 </create>
5475                                 <retrieve permission="VIEW_BOOKING_RESERVATION_ATTR_MAP">
5476                                         <context link="reservation" field="pickup_lib"/>
5477                                 </retrieve>
5478                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5479                                         <context link="reservation" field="pickup_lib"/>
5480                                 </update>
5481                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5482                                         <context link="reservation" field="pickup_lib"/>
5483                                 </delete>
5484                         </actions>
5485                 </permacrud>
5486         </class>
5487
5488         <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">
5489                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5490                         <field name="bucket" reporter:datatype="link"/>
5491                         <field name="id" reporter:datatype="id" />
5492                         <field name="target_call_number" reporter:datatype="link" />
5493                         <field name="create_time" reporter:datatype="timestamp" />
5494                         <field name="pos" reporter:datatype="int" />
5495                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5496                 </fields>
5497                 <links>
5498                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5499                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5500             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5501                 </links>
5502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5503                         <actions>
5504                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5505                     <context link="bucket" owning_lib="owning_lib"/>
5506                 </retrieve>
5507             </actions>
5508         </permacrud>
5509         </class>
5510         <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">
5511                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5512                         <field name="id" reporter:datatype="id" />
5513                         <field name="item" reporter:datatype="link"/>
5514                         <field name="note" reporter:datatype="text" />
5515                 </fields>
5516                 <links>
5517                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5518                 </links>
5519         </class>
5520         <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">
5521                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5522                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5523                         <field name="btype" reporter:datatype="text"/>
5524                         <field name="id" reporter:datatype="id" />
5525                         <field name="name" reporter:datatype="text"/>
5526                         <field name="description" reporter:datatype="text"/>
5527                         <field name="owner" reporter:datatype="link"/>
5528                         <field name="pub" reporter:datatype="bool"/>
5529                         <field name="create_time" reporter:datatype="timestamp" />
5530                         <field name="owning_lib" reporter:datatype="org_unit" />
5531                 </fields>
5532                 <links>
5533                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5534                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5535                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5536                 </links>
5537                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5538                         <actions>
5539                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5540                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5541                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5542                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5543                         </actions>
5544                 </permacrud>
5545         </class>
5546         <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">
5547                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5548                         <field name="id" reporter:datatype="id" />
5549                         <field name="bucket" reporter:datatype="link"/>
5550                         <field name="note" reporter:datatype="text" />
5551                 </fields>
5552                 <links>
5553                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5554                 </links>
5555         </class>
5556         <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">
5557                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5558                         <field name="hold" reporter:datatype="link"/>
5559                         <field name="id" reporter:datatype="id" />
5560                         <field name="target_copy" reporter:datatype="link"/>
5561                         <field name="proximity" reporter:datatype="number"/>
5562                 </fields>
5563                 <links>
5564                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5565                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5566                 </links>
5567         </class>
5568         <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">
5569                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5570                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5571                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5572                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5573                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5574                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5575                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5576                 </fields>
5577                 <links>
5578                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5579                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5580                 </links>
5581         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5582             <actions>
5583                 <create permission="CREATE_HOLD_NOTIFICATION">
5584                                         <context link="hold" jump="usr" field="home_ou" />
5585                                 </create>
5586                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5587                                         <context link="hold" jump="usr" field="home_ou" />
5588                                 </retrieve>
5589                 <update permission="CREATE_HOLD_NOTIFICATION">
5590                                         <context link="hold" jump="usr" field="home_ou" />
5591                                 </update>
5592                 <delete permission="CREATE_HOLD_NOTIFICATION">
5593                                         <context link="hold" jump="usr" field="home_ou" />
5594                                 </delete>
5595             </actions>
5596         </permacrud>
5597         </class>
5598         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Shelving Location"  oils_persist:field_safe="true">
5599                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5600                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5601                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5602                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5603                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5604                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5605                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5606                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5607                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5608                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5609                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5610                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5611                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5612                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5613                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5614                 </fields>
5615                 <links>
5616                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5617                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5618                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5619                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5620                 </links>
5621         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5622             <actions>
5623                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5624                 <retrieve/>
5625                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5626                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5627             </actions>
5628         </permacrud>
5629         </class>
5630         <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">
5631                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5632                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5633                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5634                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5635                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" />
5636             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5637             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5638             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5639                 </fields>
5640                 <links>
5641                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5642                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5643                 </links>
5644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5645             <actions>
5646                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5647                 <retrieve/>
5648                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5649                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5650             </actions>
5651         </permacrud>
5652         </class>
5653         <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">
5654                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5655                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5656             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5657             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5658                 </fields>
5659                 <links>
5660                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5661                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5662                 </links>
5663         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5664             <actions>
5665                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5666                                         <context link="lgroup" field="owner" />
5667                 </create>
5668                 <retrieve/>
5669                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5670                                         <context link="lgroup" field="owner" />
5671                 </update>
5672                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5673                                         <context link="lgroup" field="owner" />
5674                 </delete>
5675             </actions>
5676         </permacrud>
5677         </class>
5678
5679     <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">
5680         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5681             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5682             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5683             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5684             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5685         </fields>
5686         <links>
5687             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5688             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5689         </links>
5690         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5691             <actions>
5692                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5693                 <retrieve/>
5694                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5695                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5696             </actions>
5697         </permacrud>
5698     </class>
5699
5700         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5701                 <fields>
5702                         <field name="sre_id" oils_persist:virtual="true" />
5703                         <field name="location" oils_persist:virtual="true" />
5704                         <field name="owning_lib" oils_persist:virtual="true" />
5705                         <field name="basic_holdings" oils_persist:virtual="true" />
5706                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5707                         <field name="supplement_holdings" oils_persist:virtual="true" />
5708                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5709                         <field name="index_holdings" oils_persist:virtual="true" />
5710                         <field name="index_holdings_add" oils_persist:virtual="true" />
5711                         <field name="online" oils_persist:virtual="true" />
5712                         <field name="missing" oils_persist:virtual="true" />
5713                         <field name="incomplete" oils_persist:virtual="true" />
5714                 </fields>
5715         </class>
5716
5717         <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">
5718                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5719                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5720                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5721                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5722                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5723                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5724                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5725                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5726                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5727                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5728                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5729                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5730                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5731                 </fields>
5732                 <links>
5733                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5734                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5735                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5736                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5737                 </links>
5738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5739                         <actions>
5740                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5741                                 <retrieve/>
5742                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5743                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5744                         </actions>
5745                 </permacrud>
5746         </class>
5747
5748         <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">
5749                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5750                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5751                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5752                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5753                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5754                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5755                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5756                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5757                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5758                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5759                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5760                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5761                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5762                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5763                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5764                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5765                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5766                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5767                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5768                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5769                 </fields>
5770                 <links>
5771                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5772                 </links>
5773                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5774                         <actions>
5775                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5776                                         <context link="subscription" field="owning_lib" />
5777                                 </create>
5778                                 <retrieve />
5779                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5780                                         <context link="subscription" field="owning_lib" />
5781                                 </update>
5782                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5783                                         <context link="subscription" field="owning_lib" />
5784                                 </delete>
5785                         </actions>
5786                 </permacrud>
5787         </class>
5788
5789         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5790                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5791                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5792                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5793                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5794                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5795                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5796                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5797                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5798                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5799                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5800                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5801                 </fields>
5802                 <links>
5803                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5804                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5805                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5806                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5807                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5808                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5809                 </links>
5810                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5811                         <actions>
5812                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5813                                 <retrieve />
5814                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5815                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5816                         </actions>
5817                 </permacrud>
5818         </class>
5819
5820         <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">
5821                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5822                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5823                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5824                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5825                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5826                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5827                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5828                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5829                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5830                 </fields>
5831                 <links>
5832                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5833                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5834                 </links>
5835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5836                         <actions>
5837                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5838                     <context link="subscription" field="owning_lib"/>
5839                 </create>
5840                                 <retrieve />
5841                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5842                     <context link="subscription" field="owning_lib"/>
5843                 </update>
5844                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5845                     <context link="subscription" field="owning_lib"/>
5846                 </delete>
5847                         </actions>
5848                 </permacrud>
5849         </class>
5850
5851         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5852                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5853                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5854                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5855                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5856                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5857                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5858                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5859                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5860                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5861                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5862                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5863                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5864                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5865                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5866                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5867                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5868                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5869                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5870                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5871                 </fields>
5872                 <links>
5873                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5874                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5875                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5876                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5877                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5878                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5879                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5880                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5881                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5882                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5883                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5884                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5885                 </links>
5886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5887                         <actions>
5888                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5889                                 <retrieve />
5890                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5891                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5892                         </actions>
5893                 </permacrud>
5894         </class>
5895
5896         <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">
5897                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5898                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5899                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5900                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5901                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5902                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5903                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5904                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5905                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5906                 </fields>
5907                 <links>
5908                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5909                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5910                 </links>
5911                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5912                         <actions>
5913                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5914                                         <context link="distribution" field="holding_lib" />
5915                                 </create>
5916                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5917                                         <context link="distribution" field="holding_lib" />
5918                                 </retrieve>
5919                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5920                                         <context link="distribution" field="holding_lib" />
5921                                 </update>
5922                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5923                                         <context link="distribution" field="holding_lib" />
5924                                 </delete>
5925                         </actions>
5926                 </permacrud>
5927         </class>
5928
5929         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5930                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5931                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5932                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5933                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5934                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5935                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5936                 </fields>
5937                 <links>
5938                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5939                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5940                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5941                 </links>
5942                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5943                         <actions>
5944                                 <create permission="ADMIN_SERIAL_STREAM">
5945                                         <context link="distribution" field="holding_lib" />
5946                                 </create>
5947                                 <retrieve />
5948                                 <update permission="ADMIN_SERIAL_STREAM">
5949                                         <context link="distribution" field="holding_lib" />
5950                                 </update>
5951                                 <delete permission="ADMIN_SERIAL_STREAM">
5952                                         <context link="distribution" field="holding_lib" />
5953                                 </delete>
5954                         </actions>
5955                 </permacrud>
5956         </class>
5957
5958         <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">
5959                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5960                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5961                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5962                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5963                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5964                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5965                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5966                 </fields>
5967                 <links>
5968                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5969                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5970                 </links>
5971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5972                         <actions>
5973                                 <create permission="ADMIN_SERIAL_STREAM">
5974                                         <context link="stream" jump="distribution" field="holding_lib" />
5975                                 </create>
5976                                 <retrieve permission="RECEIVE_SERIAL">
5977                                         <context link="stream" jump="distribution" field="holding_lib" />
5978                                 </retrieve>
5979                                 <update permission="ADMIN_SERIAL_STREAM">
5980                                         <context link="stream" jump="distribution" field="holding_lib" />
5981                                 </update>
5982                                 <delete permission="ADMIN_SERIAL_STREAM">
5983                                         <context link="stream" jump="distribution" field="holding_lib" />
5984                                 </delete>
5985                         </actions>
5986                 </permacrud>
5987         </class>
5988
5989         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5990                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5991                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5992                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5993                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5994                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5995                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5996                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5997                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5998                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5999                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
6000                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
6001                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
6002                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
6003                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
6004                 </fields>
6005                 <links>
6006                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6007                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6008                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
6009                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
6010                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
6011                 </links>
6012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6013                         <actions>
6014                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
6015                                         <context link="subscription" field="owning_lib" />
6016                                 </create>
6017                                 <retrieve/>
6018                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
6019                                         <context link="subscription" field="owning_lib" />
6020                                 </update>
6021                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
6022                                         <context link="subscription" field="owning_lib" />
6023                                 </delete>
6024                         </actions>
6025                 </permacrud>
6026         </class>
6027
6028         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
6029                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6030                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6031                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6032                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6033                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6034                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6035                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6036                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6037                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6038                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6039                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6040                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6041                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6042                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6043                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6044                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6045                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6046                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6047                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6048                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6049                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6050                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6051                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6052                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6053                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6054                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6055                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6056                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6057                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6058                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6059                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6060                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6061                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6062                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6063                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
6064                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
6065                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
6066                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6067                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6068                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6069                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6070                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6071                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6072                 </fields>
6073                 <links>
6074                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6075                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6076                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6077                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6078                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6079                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6080                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6081                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6082                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6083                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6084                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6085                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6086                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6087                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6088                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6089                 </links>
6090                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6091                         <actions>
6092                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6093                                 <retrieve/>
6094                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6095                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6096                         </actions>
6097                 </permacrud>
6098         </class>
6099
6100         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
6101                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
6102                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6103                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6104                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6105                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6106                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6107                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
6108                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6109                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
6110                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
6111                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
6112                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
6113                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
6114                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6115                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
6116                 </fields>
6117                 <links>
6118                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6119                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6120                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6121                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6122                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
6123                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
6124                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
6125                 </links>
6126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6127                         <actions>
6128                                 <create permission="ADMIN_SERIAL_ITEM">
6129                                         <context link="stream" jump="distribution" field="holding_lib" />
6130                                 </create>
6131                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6132                                         <context link="stream" jump="distribution" field="holding_lib" />
6133                                 </retrieve>
6134                                 <update permission="ADMIN_SERIAL_ITEM">
6135                                         <context link="stream" jump="distribution" field="holding_lib" />
6136                                 </update>
6137                                 <delete permission="ADMIN_SERIAL_ITEM">
6138                                         <context link="stream" jump="distribution" field="holding_lib" />
6139                                 </delete>
6140                         </actions>
6141                 </permacrud>
6142         </class>
6143
6144         <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">
6145                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
6146                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6147                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
6148                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6149                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6150                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
6151                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
6152                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6153                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6154                 </fields>
6155                 <links>
6156                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
6157                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6158                 </links>
6159                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6160                         <actions>
6161                                 <create permission="ADMIN_SERIAL_ITEM">
6162                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6163                                 </create>
6164                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6165                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6166                                 </retrieve>
6167                                 <update permission="ADMIN_SERIAL_ITEM">
6168                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6169                                 </update>
6170                                 <delete permission="ADMIN_SERIAL_ITEM">
6171                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6172                                 </delete>
6173                         </actions>
6174                 </permacrud>
6175         </class>
6176         <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">
6177                 <fields>
6178                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
6179                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
6180                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
6181                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
6182                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
6183                 </fields>
6184                 <links>
6185                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6186                 </links>
6187         </class>
6188         <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">
6189                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
6190                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6191                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
6192                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
6193                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
6194                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
6195                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
6196                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
6197                 </fields>
6198                 <links>
6199                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6200                 </links>
6201         </class>
6202         <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">
6203                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
6204                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6205                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6206                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6207                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6208                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6209                 </fields>
6210                 <links>
6211                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6212                 </links>
6213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6214                         <actions>
6215                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6216                                         <context link="distribution" field="holding_lib" />
6217                                 </create>
6218                                 <retrieve/>
6219                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6220                                         <context link="distribution" field="holding_lib" />
6221                                 </update>
6222                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6223                                         <context link="distribution" field="holding_lib" />
6224                                 </delete>
6225                         </actions>
6226                 </permacrud>
6227         </class>
6228
6229         <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">
6230                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
6231                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6232                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6233                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6234                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6235                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6236                 </fields>
6237                 <links>
6238                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6239                 </links>
6240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6241                         <actions>
6242                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6243                                         <context link="distribution" field="holding_lib" />
6244                                 </create>
6245                                 <retrieve/>
6246                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6247                                         <context link="distribution" field="holding_lib" />
6248                                 </update>
6249                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6250                                         <context link="distribution" field="holding_lib" />
6251                                 </delete>
6252                         </actions>
6253                 </permacrud>
6254         </class>
6255
6256         <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">
6257                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
6258                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6259                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6260                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6261                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6262                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6263                 </fields>
6264                 <links>
6265                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6266                 </links>
6267                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6268                         <actions>
6269                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6270                                         <context link="distribution" field="holding_lib" />
6271                                 </create>
6272                                 <retrieve/>
6273                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6274                                         <context link="distribution" field="holding_lib" />
6275                                 </update>
6276                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6277                                         <context link="distribution" field="holding_lib" />
6278                                 </delete>
6279                         </actions>
6280                 </permacrud>
6281         </class>
6282
6283         <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">
6284                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6285                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6286                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6287                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6288                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6289                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6290                 </fields>
6291                 <links>
6292                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6293                 </links>
6294                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6295                         <actions>
6296                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6297                                 <retrieve/>
6298                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6299                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6300                         </actions>
6301                 </permacrud>
6302         </class>
6303
6304         <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">
6305                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6306                         <field name="id" reporter:datatype="id" />
6307                         <field name="owning_copy" reporter:datatype="link"/>
6308                         <field name="stat_cat" reporter:datatype="link"/>
6309                         <field name="stat_cat_entry" reporter:datatype="link"/>
6310                 </fields>
6311                 <links>
6312                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6313                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6314                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6315                 </links>
6316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6317                         <actions>
6318                                 <retrieve/>
6319                         </actions>
6320                 </permacrud>
6321         </class>
6322         <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">
6323                 <fields oils_persist:primary="code">
6324                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6325                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6326                 </fields>
6327                 <links/>
6328         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6329             <actions>
6330                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6331                 <retrieve/>
6332                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6333                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6334             </actions>
6335         </permacrud>
6336         </class>
6337         <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">
6338                 <fields oils_persist:primary="code">
6339                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6340                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6341                 </fields>
6342                 <links/>
6343         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6344             <actions>
6345                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6346                 <retrieve/>
6347                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6348                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6349             </actions>
6350         </permacrud>
6351         </class>
6352         <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">
6353                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6354                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6355                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6356                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6357                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6358                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6359                 </fields>
6360                 <links>
6361             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6362         </links>
6363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6364             <actions>
6365                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6366                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6367                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6368                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6369             </actions>
6370         </permacrud>
6371         </class>
6372         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Library Group">
6373                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6374                         <field reporter:label="Library Group ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6375                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6376                         <field reporter:label="Global?" name="global" reporter:datatype="bool"/>
6377                         <field reporter:label="Maps" name="maps" oils_persist:virtual="true" reporter:datatype="link"/>
6378                 </fields>
6379                 <links>
6380                         <link field="maps" reltype="has_many" key="lasso" map="" class="lmap"/>
6381         </links>
6382         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6383             <actions>
6384                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6385                 <retrieve/>
6386                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6387                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6388             </actions>
6389         </permacrud>
6390         </class>
6391         <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="Library Group Map">
6392                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6393                         <field reporter:label="Library Group Map ID" name="id" reporter:datatype="id" />
6394                         <field reporter:label="Library Group" name="lasso" reporter:datatype="link"/>
6395                         <field reporter:label="Organizational Unit" name="org_unit" reporter:datatype="org_unit"/>
6396                 </fields>
6397                 <links>
6398                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6399                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6400                 </links>
6401         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6402             <actions>
6403                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6404                 <retrieve/>
6405                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6406                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6407             </actions>
6408         </permacrud>
6409         </class>
6410         <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">
6411                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6412                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6413                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6414                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6415                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6416                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6417                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6418                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6419                         <field name="pos" reporter:label="Position" reporter:datatype="int" oils_obj:required="true" />
6420                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6421                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6422                 </fields>
6423                 <links>
6424                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6425                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6426                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6427                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6428                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6429                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6430                 </links>
6431         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6432             <actions>
6433                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6434                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6435                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6436                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6437             </actions>
6438         </permacrud>
6439         </class>
6440         <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">
6441                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6442                         <field name="id" reporter:datatype="id" />
6443                         <field name="from_org" reporter:datatype="org_unit"/>
6444                         <field name="to_org" reporter:datatype="org_unit"/>
6445                         <field name="prox" reporter:datatype="int" />
6446                 </fields>
6447                 <links>
6448                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6449                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6450                 </links>
6451         </class>
6452         <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">
6453                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6454                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6455                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6456                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6457                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6458                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6459                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6460                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6461                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6462                 </fields>
6463                 <links/>
6464         </class>
6465         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6466                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6467                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6468                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6469                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6470                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6471                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6472                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6473                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6474                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6475                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6476                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6477                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6478                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6479                 </fields>
6480                 <links>
6481                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6482                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6483                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6484                 </links>
6485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6486             <actions>
6487                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6488                 <retrieve/>
6489                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6490                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6491             </actions>
6492         </permacrud>
6493         </class>
6494         <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">
6495                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6496                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6497                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6498                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6499                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6500                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6501                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6502                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6503                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6504                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6505                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6506                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6507                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6508                 </fields>
6509                 <links>
6510                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6511                 </links>
6512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6513             <actions>
6514                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6515                 <retrieve/>
6516                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6517                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6518             </actions>
6519         </permacrud>
6520         </class>
6521         <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">
6522                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6523                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6524                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6525                         <field name="query_text" reporter:datatype="text"/>
6526                 </fields>
6527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6528             <actions>
6529                 <retrieve/>
6530             </actions>
6531         </permacrud>
6532         </class>
6533
6534         <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">
6535                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6536                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6537                         <field name="owner" reporter:datatype="org_unit"/>
6538                         <field name="code" reporter:datatype="text"/>
6539                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6540                         <field name="create_date" reporter:datatype="timestamp"/>
6541                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6542                 </fields>
6543                 <links>
6544                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6545                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6546                 </links>
6547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6548             <actions>
6549                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6550                 <retrieve/>
6551                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6552                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6553             </actions>
6554         </permacrud>
6555         </class>
6556         <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">
6557                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6558                         <field name="id" reporter:datatype="id"/>
6559                         <field name="grp" reporter:datatype="link"/>
6560                         <field name="pos" reporter:datatype="int"/>
6561                         <field name="query" reporter:datatype="link"/>
6562                 </fields>
6563                 <links>
6564                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6565                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6566                 </links>
6567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6568             <actions>
6569                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6570                     <context link="grp" field="owner"/>
6571                 </create>
6572                 <retrieve/>
6573                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6574                     <context link="grp" field="owner"/>
6575                 </update>
6576                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6577                     <context link="grp" field="owner"/>
6578                 </delete>
6579             </actions>
6580         </permacrud>
6581         </class>
6582
6583         <!-- A note: Please update alhr and ahopl when updating ahr -->
6584         <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">
6585                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6586                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6587                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6588                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6589                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6590                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6591                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6592                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6593                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6594                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6595                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6596                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6597                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6598                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6599                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6600                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6601                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6602                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6603                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6604                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6605                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6606                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6607                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6608                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6609                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6610                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6611                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6612                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6613                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6614                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6615                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6616                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6617                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6618                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6619                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6620                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6621                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6622                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6623                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6624                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6625                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6626                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6627                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6628                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6629                 </fields>
6630                 <links>
6631                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6632                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6633                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6634                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6635                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6636                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6637                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6638                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6639                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6640                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6641                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6642                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6643                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6644                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6645                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6646                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6647                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6648                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6649                 </links>
6650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6651                         <actions>
6652                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6653                         </actions>
6654                 </permacrud>
6655         </class>
6656         <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">
6657                 <oils_persist:source_definition><![CDATA[
6658                 SELECT
6659                         ahr.*,
6660                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6661                                 copy_location_order_position,
6662                         CASE WHEN au.alias IS NOT NULL THEN
6663                                 au.alias
6664                         ELSE
6665                                 au.first_given_name
6666                         END AS usr_alias_or_first_given_name,
6667                         au.first_given_name AS usr_first_given_name,
6668                         au.second_given_name AS usr_second_given_name,
6669                         au.family_name AS usr_family_name,
6670                         au.prefix AS usr_prefix,
6671                         au.suffix AS usr_suffix,
6672                         au.alias AS usr_alias,
6673                         CASE WHEN au.alias IS NOT NULL THEN
6674                                 au.alias
6675                         ELSE
6676                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6677                                         COALESCE(au.family_name, ''),
6678                                         COALESCE(au.suffix, ''),
6679                                         ', ',
6680                                         COALESCE(au.prefix, ''),
6681                                         COALESCE(au.first_given_name, ''),
6682                                         COALESCE(au.second_given_name, '')
6683                                 ], ' '), E'\\s+,', ',')
6684                         END AS usr_alias_or_display_name,
6685                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6686                                 COALESCE(au.family_name, ''),
6687                                 COALESCE(au.suffix, ''),
6688                                 ', ',
6689                                 COALESCE(au.prefix, ''),
6690                                 COALESCE(au.first_given_name, ''),
6691                                 COALESCE(au.second_given_name, '')
6692                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6693                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6694                                 AS call_number_label,
6695                         siss.label AS issuance_label,
6696                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6697                         ahcm_1.copy_count AS potential_copies
6698                 FROM action.hold_request ahr
6699                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6700                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6701                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6702                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6703                 JOIN actor.usr au ON (au.id = ahr.usr)
6704                 JOIN (
6705                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6706                         FROM asset.copy_location
6707                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6708                 LEFT JOIN actor.usr_standing_penalty ausp 
6709                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6710                 LEFT JOIN config.standing_penalty csp
6711                         ON (
6712                                 csp.id = ausp.standing_penalty AND 
6713                                 csp.block_list LIKE '%CAPTURE%' AND (
6714                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6715                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6716                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6717                                         )
6718                                 )
6719                         )
6720                 JOIN (
6721                         SELECT COUNT(target_copy) AS copy_count, hold
6722                         FROM action.hold_copy_map
6723                         GROUP BY 2
6724                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6725                 LEFT JOIN serial.issuance siss
6726                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6727                 LEFT JOIN asset.copy_location_order acplo
6728                         ON (acp.location = acplo.location AND
6729                                 acp.circ_lib = acplo.org)
6730                 WHERE
6731                         ahr.capture_time IS NULL AND
6732                         ahr.cancel_time IS NULL AND
6733                         csp.id IS NULL AND
6734                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6735                         acp.status IN (0,7)
6736                 ]]></oils_persist:source_definition>
6737                 <fields oils_persist:primary="id">
6738                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6739                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6740                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6741                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6742                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6743                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6744                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6745                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6746                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6747                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6748                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6749                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6750                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6751                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6752                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6753                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6754                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6755                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6756                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6757                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6758                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6759                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6760                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6761                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6762                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6763                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6764                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6765                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6766                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6767                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6768                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6769                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6770                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6771                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6772                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6773                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6774                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6775                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6776                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6777                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6778                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6779                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6780                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6781                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6782                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6783                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6784                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6785                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6786                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6787                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6788                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6789                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6790                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6791                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6792                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6793                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6794                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6795                 </fields>
6796                 <links>
6797                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6798                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6799                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6800                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6801                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6802                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6803                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6804                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6805                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6806                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6807                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6808                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6809                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6810                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6811                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6812                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6813                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6814                 </links>
6815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6816                         <actions>
6817                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6818                         </actions>
6819                 </permacrud>
6820         </class>
6821         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6822                 <oils_persist:source_definition><![CDATA[
6823                         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)
6824                 ]]></oils_persist:source_definition>
6825                 <fields oils_persist:primary="id">
6826                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6827                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6828                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6829                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6830                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6831                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6832                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6833                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6834                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6835                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6836                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6837                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6838                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6839                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6840                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6841                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6842                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6843                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6844                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6845                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6846                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6847                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6848                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6849                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6850                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6851                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6852                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6853                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6854                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6855                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6856                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6857                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6858                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6859                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6860                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6861                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6862                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6863                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6864                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6865                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6866                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6867                 </fields>
6868                 <links>
6869                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6870                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6871                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6872                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6873                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6874                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6875                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6876                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6877                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6878                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6879                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6880                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6881                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6882                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6883                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6884                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6885                 </links>
6886         </class>
6887
6888         <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">
6889                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6890                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6891                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6892                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6893                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6894                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6895                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6896                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6897                 </fields>
6898                 <links>
6899                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6900                 </links>
6901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6902                         <actions>
6903                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6904                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6905                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6906                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6907                         </actions>
6908                 </permacrud>
6909         </class>
6910         <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">
6911                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6912                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6913                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6914                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6915                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6916                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6917                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6918                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6919                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6920                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6921                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6922                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6923                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6924                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6925                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6926                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6927                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6928                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6929                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6930                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6931                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6932                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6933                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6934                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6935                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6936                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6937                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6938                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6939                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6940                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6941                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6942                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6943                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6944                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6945                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6946                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6947                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6948                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6949                 </fields>
6950                 <links>
6951                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6952                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6953                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6954                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6955                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6956                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6957                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6958                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6959                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6960                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6961                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6962                 </links>
6963                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6964                         <actions>
6965                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6966                         </actions>
6967                 </permacrud>
6968         </class>
6969         <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">
6970                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6971                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6972                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6973                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6974                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6975                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6976                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6977                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6978                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6979                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6980                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6981                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6982                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6983                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6984                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6985                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6986                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6987                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6988                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6989                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6990                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6991                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6992                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6993                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6994                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6995                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6996                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6997                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6998                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6999                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7000                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7001                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7002                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7003                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7004                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7005                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7006                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7007                 </fields>
7008                 <links>
7009                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7010                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7011                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7012                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7013                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7014                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7015                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7016                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7017                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7018                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7019                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7020                 </links>
7021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7022                         <actions>
7023                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7024                         </actions>
7025                 </permacrud>
7026         </class>
7027
7028         <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">
7029                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
7030                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
7031                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
7032                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
7033                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
7034                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
7035                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
7036                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
7037                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
7038                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
7039                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
7040                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7041                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
7042                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7043                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
7044                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
7045                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
7046                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7047                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
7048                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
7049                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
7050                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
7051                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7052                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
7053                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
7054                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
7055                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
7056                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
7057                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
7058                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
7059                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
7060                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
7061                 </fields>
7062                 <links>
7063                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
7064                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
7065                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
7066                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
7067                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
7068                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
7069                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7070                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
7071                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
7072                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
7073                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
7074                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
7075                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
7076                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
7077                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
7078                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
7079                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
7080                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
7081                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
7082                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
7083                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
7084                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
7085                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
7086                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
7087                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
7088                 </links>
7089         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7090             <actions>
7091                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
7092                 <retrieve />
7093                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
7094                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
7095             </actions>
7096         </permacrud>
7097         </class>
7098         <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">
7099                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
7100                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7101                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
7102                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
7103                 </fields>
7104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7105                         <actions>
7106                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7107                                 <retrieve/>
7108                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7109                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7110                         </actions>
7111                 </permacrud>
7112         </class>
7113         <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">
7114                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
7115                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7116                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
7117                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
7118                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
7119                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
7120                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
7121                 </fields>
7122                 <links>
7123                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
7124                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7125                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
7126                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
7127                 </links>
7128                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7129                         <actions>
7130                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7131                                 <retrieve/>
7132                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7133                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7134                         </actions>
7135                 </permacrud>
7136         </class>
7137         <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">
7138                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
7139                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7140                         <field name="btype" reporter:datatype="text"/>
7141                         <field name="id" reporter:datatype="id" />
7142                         <field name="name"  reporter:datatype="text"/>
7143                         <field name="description" reporter:datatype="text"/>
7144                         <field name="owner" reporter:datatype="link"/>
7145                         <field name="pub" reporter:datatype="bool"/>
7146                         <field name="create_time" reporter:datatype="timestamp" />
7147                         <field name="owning_lib" reporter:datatype="org_unit" />
7148                 </fields>
7149                 <links>
7150                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7151                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7152                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
7153                 </links>
7154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7155                         <actions>
7156                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7157                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7158                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7159                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7160                         </actions>
7161                 </permacrud>
7162         </class>
7163         <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">
7164                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
7165                         <field name="id" reporter:datatype="id" />
7166                         <field name="bucket" reporter:datatype="link"/>
7167                         <field name="note" reporter:datatype="text" />
7168                 </fields>
7169                 <links>
7170                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
7171                 </links>
7172         </class>
7173         <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">
7174                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
7175                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7176                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7177                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7178                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7179                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7180                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7181                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7182                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7183                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7184                 </fields>
7185                 <links>
7186                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7187                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
7188                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
7189                 </links>
7190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7191                         <actions>
7192                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7193                         </actions>
7194                 </permacrud>
7195         </class>
7196         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
7197                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
7198                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
7199                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7200                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
7201                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7202                 </fields>
7203                 <links>
7204                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7205                 </links>
7206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7207                         <actions>
7208                                 <retrieve permission="VIEW_USER user_request.view">
7209                                         <context link="usr" field="home_ou" />
7210                                 </retrieve>
7211                         </actions>
7212                 </permacrud>
7213         </class>
7214     <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">
7215         <fields oils_persist:primary="field">
7216             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7217             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7218             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7219         </fields>
7220         <links/>
7221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7222             <actions>
7223                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
7224                 <retrieve />
7225                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
7226                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
7227             </actions>
7228         </permacrud>
7229     </class>
7230         <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">
7231                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
7232                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7233                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7234                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7235                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7236                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7237                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7238                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
7239                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7240                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7241                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7242                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7243                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
7244                 </fields>
7245                 <links>
7246                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7247                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
7248                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
7249                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
7250                 </links>
7251         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7252             <actions>
7253                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
7254                 <retrieve />
7255                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
7256                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
7257             </actions>
7258         </permacrud>
7259         </class>
7260         <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">
7261                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
7262                         <field name="field" reporter:datatype="link"/>
7263                         <field name="id" reporter:datatype="id" />
7264                         <field name="source" reporter:datatype="link"/>
7265                         <field name="value"  reporter:datatype="text"/>
7266                 </fields>
7267                 <links>
7268                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7269                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7270                 </links>
7271         </class>
7272         <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">
7273                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
7274                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7275                         <field name="btype" reporter:datatype="text"/>
7276                         <field name="id" reporter:datatype="id" />
7277                         <field name="name"  reporter:datatype="text"/>
7278                         <field name="description" reporter:datatype="text"/>
7279                         <field name="owner" reporter:datatype="link"/>
7280                         <field name="pub" reporter:datatype="bool"/>
7281                         <field name="create_time" reporter:datatype="timestamp" />
7282                         <field name="owning_lib" reporter:datatype="org_unit" />
7283                 </fields>
7284                 <links>
7285                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7286                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7287                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7288                 </links>
7289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7290                         <actions>
7291                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7292                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7293                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7294                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7295                         </actions>
7296                 </permacrud>
7297         </class>
7298         <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">
7299                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7300                         <field name="id" reporter:datatype="id" />
7301                         <field name="bucket" reporter:datatype="link"/>
7302                         <field name="note" reporter:datatype="text" />
7303                 </fields>
7304                 <links>
7305                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7306                 </links>
7307         </class>
7308         <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">
7309                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7310                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7311                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7312                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7313                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7314                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7315                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7316                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7317                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7318                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7319                 </fields>
7320                 <links>
7321                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7322                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7323                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7324                 </links>
7325         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7326             <actions>
7327                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7328                     <context link="xact" jump="usr" field="home_ou"/>
7329                 </retrieve>
7330                         </actions>
7331                 </permacrud>
7332         </class>
7333         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7334                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7335                         <field name="id" reporter:datatype="id" />
7336                         <field name="ind1" />
7337                         <field name="ind2" />
7338                         <field name="record" />
7339                         <field name="subfield" />
7340                         <field name="tag" />
7341                         <field name="value" />
7342                 </fields>
7343                 <links>
7344                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7345                 </links>
7346         </class>
7347         <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">
7348                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7349                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7350                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7351                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7352                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7353                 </fields>
7354                 <links>
7355                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7356                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7357                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7358                 </links>
7359         </class>
7360         <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">
7361                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7362                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7363                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7364                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7365                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7366                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7367                 </fields>
7368                 <links>
7369                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7370                 </links>
7371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7372             <actions>
7373                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7374                 <retrieve/>
7375                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7376                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7377             </actions>
7378         </permacrud>
7379
7380         </class>
7381         <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">
7382                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7383                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7384                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7385                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7386                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7387                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7388                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7389                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7390                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7391                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7392                 </fields>
7393                 <links>
7394                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7395                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7396                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7397                 </links>
7398         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7399             <actions>
7400                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7401                 <retrieve/>
7402                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7403                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7404             </actions>
7405         </permacrud>
7406         </class>
7407         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7408                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7409                         <field name="create_date" reporter:datatype="timestamp"/>
7410                         <field name="creator" reporter:datatype="link"/>
7411                         <field name="edit_date" reporter:datatype="timestamp"/>
7412                         <field name="editor" reporter:datatype="link"/>
7413                         <field name="id" reporter:datatype="id" />
7414                         <field name="pub" reporter:datatype="bool"/>
7415                         <field name="record" reporter:datatype="link"/>
7416                         <field name="value"  reporter:datatype="text"/>
7417                 </fields>
7418                 <links>
7419                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7420                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7421                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7422                 </links>
7423         </class>
7424         <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">
7425                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7426                         <field name="balance_owed" reporter:datatype="money" />
7427                         <field name="total_owed" reporter:datatype="money" />
7428                         <field name="total_paid" reporter:datatype="money" />
7429                         <field name="usr" reporter:datatype="link"/>
7430                 </fields>
7431                 <links>
7432                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7433                 </links>
7434         </class>
7435     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7436                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7437                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7438                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7439                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7440                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7441                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7442                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7443                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7444                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7445                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7446                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7447                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7448                 </fields>
7449                 <links>
7450                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7451                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7452                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7453                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7454                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7455                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7456                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7457                 </links>
7458         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7459             <actions>
7460                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7461             </actions>
7462         </permacrud>
7463         </class>
7464         <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">
7465                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7466                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7467                         <field name="quality" reporter:datatype="int" />
7468                         <field name="source" reporter:datatype="text"/>
7469                         <field name="transcendant" reporter:datatype="bool"/>
7470                         <field name="can_have_copies" reporter:datatype="bool"/>
7471                 </fields>
7472                 <links/>
7473         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7474             <actions>
7475                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7476                 <retrieve/>
7477                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7478                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7479             </actions>
7480         </permacrud>
7481         </class>
7482         <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">
7483                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7484                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7485                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7486                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7487                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7488                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7489                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7490                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7491                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7492                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7493                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7494                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7495                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7496                 </fields>
7497                 <links>
7498                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7499                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7500                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7501                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7502                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7503                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7504                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7505                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7506                 </links>
7507                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7508                         <actions>
7509                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7510                                         <context link="usr" field="home_ou" />
7511                                 </retrieve>
7512                         </actions>
7513                 </permacrud>
7514         </class>
7515         <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">
7516                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7517                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7518                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7519                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7520                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7521                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7522                 </fields>
7523                 <links>
7524                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7525                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7526                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7527                 </links>
7528         </class>
7529         <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">
7530                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7531                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7532                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7533                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7534                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7535                 </fields>
7536                 <links>
7537                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7538                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7539                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7540                 </links>
7541         </class>
7542         <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">
7543                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7544                         <field name="bucket" reporter:datatype="link"/>
7545                         <field name="id" reporter:datatype="id" />
7546                         <field name="target_user" reporter:datatype="link"/>
7547                         <field name="create_time" reporter:datatype="timestamp" />
7548                         <field name="pos" reporter:datatype="int" />
7549                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7550                 </fields>
7551                 <links>
7552                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7553                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7554             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7555                 </links>
7556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7557                         <actions>
7558                                 <retrieve permission="ADMIN_USER_BUCKET">
7559                     <context link="bucket" owning_lib="owning_lib"/>
7560                 </retrieve>
7561             </actions>
7562         </permacrud>
7563         </class>
7564         <class id="abhe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::batch_hold_event" oils_persist:tablename="action.batch_hold_event" reporter:label="Hold Group Event">
7565                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_id_seq">
7566                         <field name="id" reporter:datatype="id" />
7567                         <field name="staff" reporter:datatype="link"/>
7568                         <field name="bucket" reporter:datatype="link"/>
7569                         <field name="target" reporter:datatype="int" />
7570                         <field name="hold_type" reporter:datatype="text" />
7571                         <field name="run_date" reporter:datatype="timestamp" />
7572                         <field name="cancelled" reporter:datatype="timestamp" />
7573                         <field name="mappings" oils_persist:virtual="true" reporter:datatype="link" />
7574                 </fields>
7575                 <links>
7576                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7577                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7578                         <link field="mappings" reltype="has_many" key="batch_hold_event" map="" class="abhem"/>
7579                 </links>
7580                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7581                         <actions>
7582                 <create permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7583                 <retrieve/>
7584                 <update permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7585                 <delete permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7586             </actions>
7587         </permacrud>
7588         </class>
7589         <class id="abhem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::batch_hold_event_map" oils_persist:tablename="action.batch_hold_event_map" reporter:label="Hold Group Event Map">
7590                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_map_id_seq">
7591                         <field name="id" reporter:datatype="id" />
7592                         <field name="batch_hold_event" reporter:datatype="link"/>
7593                         <field name="hold" reporter:datatype="link"/>
7594                 </fields>
7595                 <links>
7596                         <link field="batch_hold_event" reltype="has_a" key="id" map="" class="abhe"/>
7597                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7598                 </links>
7599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7600                         <actions>
7601                 <retrieve/>
7602             </actions>
7603         </permacrud>
7604         </class>
7605         <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">
7606                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7607                         <field name="id" reporter:datatype="id" />
7608                         <field name="item" reporter:datatype="link"/>
7609                         <field name="note" reporter:datatype="text" />
7610                 </fields>
7611                 <links>
7612                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7613                 </links>
7614         </class>
7615         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7616                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7617                         <field name="balance_owed" reporter:datatype="money" />
7618                         <field name="total_owed" reporter:datatype="money" />
7619                         <field name="total_paid" reporter:datatype="money" />
7620                         <field name="usr" reporter:datatype="link"/>
7621                 </fields>
7622                 <links>
7623                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7624                 </links>
7625         </class>
7626         <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">
7627                 <fields oils_persist:primary="code" oils_persist:sequence="">
7628                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7629                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7630                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7631                 </fields>
7632                 <links/>
7633         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7634             <actions>
7635                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7636                 <retrieve/>
7637                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7638                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7639             </actions>
7640         </permacrud>
7641         </class>
7642         <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">
7643                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7644                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7645                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7646                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7647                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7648                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7649                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7650                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7651                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7652                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7653                 </fields>
7654                 <links>
7655                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7656                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7657                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7658                 </links>
7659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7660             <actions>
7661                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7662                     <context link="xact" jump="usr" field="home_ou"/>
7663                 </retrieve>
7664                         </actions>
7665                 </permacrud>
7666         </class>
7667         <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">
7668                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7669                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7670                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7671                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7672                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7673                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7674                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7675                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7676                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7677                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7678                 </fields>
7679                 <links>
7680                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7681                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7682                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7683                 </links>
7684         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7685             <actions>
7686                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7687                     <context link="xact" jump="usr" field="home_ou"/>
7688                 </retrieve>
7689                         </actions>
7690                 </permacrud>
7691         </class>
7692         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7693                 <fields oils_persist:primary="id" oils_persist:sequence="">
7694                         <field name="checkin_lib" reporter:datatype="link"/>
7695                         <field name="checkin_staff" reporter:datatype="link"/>
7696                         <field name="checkin_time" reporter:datatype="timestamp"/>
7697                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7698                         <field name="circ_staff" reporter:datatype="link"/>
7699                         <field name="desk_renewal" reporter:datatype="bool"/>
7700                         <field name="due_date" reporter:datatype="timestamp"/>
7701                         <field name="duration" reporter:datatype="interval"/>
7702                         <field name="duration_rule" reporter:datatype="link"/>
7703                         <field name="fine_interval" reporter:datatype="interval"/>
7704                         <field name="id" reporter:datatype="id" />
7705                         <field name="max_fine" reporter:datatype="money" />
7706                         <field name="max_fine_rule" reporter:datatype="link"/>
7707                         <field name="opac_renewal" reporter:datatype="bool"/>
7708                         <field name="phone_renewal" reporter:datatype="bool"/>
7709                         <field name="recurring_fine" reporter:datatype="money" />
7710                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7711                         <field name="renewal_remaining" reporter:datatype="int" />
7712             <field name="grace_period" reporter:datatype="interval" />
7713                         <field name="stop_fines" reporter:datatype="text"/>
7714                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7715                         <field name="target_copy" reporter:datatype="link"/>
7716                         <field name="usr" reporter:datatype="link"/>
7717                         <field name="xact_finish" reporter:datatype="timestamp" />
7718                         <field name="xact_start" reporter:datatype="timestamp" />
7719                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7720                         <field name="auto_renewal" reporter:datatype="bool"/>
7721                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7722                 </fields>
7723                 <links>
7724                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7725                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7726                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7727                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7728                 </links>
7729         </class>
7730         <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">
7731                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7732                         <field name="field" reporter:datatype="link"/>
7733                         <field name="id" reporter:datatype="id" />
7734                         <field name="source" reporter:datatype="link"/>
7735                         <field name="value" reporter:datatype="text"/>
7736                 </fields>
7737                 <links>
7738                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7739                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7740                 </links>
7741         </class>
7742         <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">
7743                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7744                         <field name="high" reporter:datatype="money" />
7745                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7746                         <field name="low" reporter:datatype="money" />
7747                         <field name="name" reporter:datatype="text"/>
7748                         <field name="normal" reporter:datatype="money" />
7749                         <field name="recurrence_interval" reporter:datatype="interval"/>
7750             <field name="grace_period" reporter:datatype="interval" />
7751                 </fields>
7752                 <links/>
7753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7754             <actions>
7755                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7756                 <retrieve/>
7757                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7758                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7759             </actions>
7760         </permacrud>
7761         </class>
7762         <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">
7763                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7764                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7765                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7766                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7767                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7768                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7769                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7770                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7771                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7772                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7773                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7774                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7775                 </fields>
7776                 <links>
7777                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7778                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7779                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7780                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7781                 </links>
7782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7783             <actions>
7784                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7785                     <context link="xact" jump="usr" field="home_ou"/>
7786                 </retrieve>
7787                         </actions>
7788                 </permacrud>
7789         </class>
7790         <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">
7791                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7792                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7793                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7794                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7795                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7796                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7797                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7798                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7799                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7800                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7801                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7802                 </fields>
7803                 <links>
7804                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7805                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7806                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7807                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7808                 </links>
7809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7810             <actions>
7811                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7812                     <context link="xact" jump="usr" field="home_ou"/>
7813                 </retrieve>
7814                         </actions>
7815                 </permacrud>
7816         </class>
7817         <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">
7818                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7819                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7820                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7821                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7822                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7823                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7824                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7825                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7826                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7827                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7828                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7829                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7830                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7831                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7832                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7833                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7834                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7835                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7836                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7837                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7838                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7839                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7840                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7841                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
7842                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7843                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7844                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7845                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7846                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7847                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7848                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7849                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7850                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7851                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7852                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7853                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7854                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7855                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7856                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7857                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7858                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7859                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7860                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7861                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7862                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7863                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7864                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7865                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7866                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7867                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7868                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7869                 </fields>
7870                 <links>
7871                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7872                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7873                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7874                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7875                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7876                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7877                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7878                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7879                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7880                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7881                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7882                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7883                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7884                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7885                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7886                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7887                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7888                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7889                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7890                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7891                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7892                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7893                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7894                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7895                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7896                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7897                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7898                 </links>
7899         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7900             <actions>
7901                 <create permission="CREATE_COPY">
7902                     <context link="call_number" field="owning_lib"/>
7903                 </create>
7904                 <retrieve/>
7905                 <update permission="UPDATE_COPY">
7906                     <context link="call_number" field="owning_lib"/>
7907                 </update>
7908                 <delete permission="DELETE_COPY">
7909                     <context link="call_number" field="owning_lib"/>
7910                 </delete>
7911             </actions>
7912         </permacrud>
7913         </class>
7914
7915         <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">
7916                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7917             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7918                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7919                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7920                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7921                 </fields>
7922                 <links>
7923                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7924                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7925                 </links>
7926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7927             <actions>
7928                                 <create/>
7929                                 <retrieve/>
7930                                 <update/>
7931                                 <delete/>
7932             </actions>
7933         </permacrud>
7934         </class>
7935
7936         <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">
7937                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7938                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7939                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7940                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7941                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7942                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7943                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7944                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7945                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7946                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7947                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7948                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7949                 </fields>
7950                 <links>
7951                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7952                 </links>
7953         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7954             <actions>
7955                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7956                 <retrieve/>
7957                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7958                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7959             </actions>
7960         </permacrud>
7961         </class>
7962
7963         <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="Item Alert Suppression">
7964                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7965                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7966                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7967                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7968                 </fields>
7969                 <links>
7970                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7971                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7972                 </links>
7973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7974             <actions>
7975                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7976                 <retrieve/>
7977                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7978                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7979             </actions>
7980         </permacrud>
7981         </class>
7982
7983         <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">
7984                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7985                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7986                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7987                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7988                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7989                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7990                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7991                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7992                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7993                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7994                 </fields>
7995                 <links>
7996                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7997                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7998                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7999                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8000                 </links>
8001         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8002             <actions>
8003                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8004                     <context link="copy" field="circ_lib"/>
8005                 </create>
8006                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8007                     <context link="copy" field="circ_lib"/>
8008                                 </retrieve>
8009                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8010                     <context link="copy" field="circ_lib"/>
8011                                 </update>
8012                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8013                     <context link="copy" field="circ_lib"/>
8014                                 </delete>
8015             </actions>
8016         </permacrud>
8017         </class>
8018
8019         <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">
8020                 <fields oils_persist:primary="id">
8021                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8022                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8023                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8024                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8025                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8026                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8027                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8028                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8029                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8030                 </fields>
8031                 <links>
8032                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8033                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8034                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8035                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8036                 </links>
8037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8038             <actions>
8039                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8040                     <context link="copy" field="circ_lib"/>
8041                 </create>
8042                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8043                     <context link="copy" field="circ_lib"/>
8044                                 </retrieve>
8045                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8046                     <context link="copy" field="circ_lib"/>
8047                                 </update>
8048                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8049                     <context link="copy" field="circ_lib"/>
8050                                 </delete>
8051             </actions>
8052         </permacrud>
8053         </class>
8054
8055         <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">
8056                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
8057                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
8058                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
8059                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8060                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8061                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8062                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8063                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8064                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
8065                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
8066                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8067                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
8068                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
8069                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
8070                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
8071                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
8072                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
8073                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
8074                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
8075                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
8076                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
8077                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
8078                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
8079                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
8080                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
8081                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
8082                 </fields>
8083                 <links>
8084                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8085                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8086                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8087                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8088                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8089                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8090                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8091                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
8092                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8093                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
8094                 </links>
8095                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8096                         <actions>
8097                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8098                                 <retrieve />
8099                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8100                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8101                         </actions>
8102                 </permacrud>
8103         </class>
8104
8105         <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">
8106                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
8107                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
8108                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8109                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8110                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
8111                 </fields>
8112                 <links/>
8113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8114             <actions>
8115                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8116                 <retrieve/>
8117                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8118                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8119             </actions>
8120         </permacrud>
8121         </class>
8122         <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">
8123                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
8124                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
8125                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8126                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8127                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
8128                 </fields>
8129                 <links/>
8130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8131             <actions>
8132                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8133                 <retrieve/>
8134                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8135                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8136             </actions>
8137         </permacrud>
8138         </class>
8139         <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">
8140                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
8141                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8142                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8143                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8144                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8145                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8146                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
8147                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
8148                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
8149                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
8150                 </fields>
8151                 <links>
8152                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
8153                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
8154                 </links>
8155         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8156             <actions>
8157                 <create permission="CREATE_PERM" global_required="true"/>
8158                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8159                 <update permission="UPDATE_PERM" global_required="true"/>
8160                 <delete permission="DELETE_PERM" global_required="true"/>
8161             </actions>
8162         </permacrud>
8163         </class>
8164         <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">
8165                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
8166                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8167                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
8168                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8169                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
8170                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8171                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8172                 </fields>
8173                 <links>
8174                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
8175                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8176                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8177                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
8178                 </links>
8179                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8180                         <actions>
8181                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8182                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8183                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8184                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8185                         </actions>
8186                 </permacrud>
8187         </class>
8188         <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">
8189                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
8190                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
8191                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
8192                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
8193                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
8194                 </fields>
8195                 <links>
8196                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
8197                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
8198                 </links>
8199         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8200             <actions>
8201                 <create permission="ADMIN_SURVEY">
8202                     <context link="question" jump="survey" field="owner"/>
8203                 </create>
8204                 <retrieve/>
8205                 <update permission="ADMIN_SURVEY">
8206                     <context link="question" jump="survey" field="owner"/>
8207                 </update>
8208                 <delete permission="ADMIN_SURVEY">
8209                     <context link="question" jump="survey" field="owner"/>
8210                 </delete>
8211             </actions>
8212         </permacrud>
8213         </class>
8214         <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">
8215                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
8216                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8217                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
8218                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
8219                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
8220                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
8221                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
8222                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
8223                 </fields>
8224                 <links>
8225                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
8226                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
8227                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
8228                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8229                 </links>
8230                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8231                         <actions>
8232                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
8233                         </actions>
8234                 </permacrud>
8235         </class>
8236         <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">
8237                 <fields oils_persist:primary="usr" oils_persist:sequence="">
8238                         <field name="balance_owed" reporter:datatype="money" />
8239                         <field name="total_owed" reporter:datatype="money" />
8240                         <field name="total_paid" reporter:datatype="money" />
8241                         <field name="usr" reporter:datatype="link"/>
8242                 </fields>
8243                 <links>
8244                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8245                 </links>
8246         </class>
8247         <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">
8248                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
8249                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
8250                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
8251                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
8252                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
8253                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8254                 </fields>
8255                 <links>
8256                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8257                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
8258                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8259                 </links>
8260         </class>
8261         <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">
8262                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
8263                         <field name="field" reporter:datatype="link"/>
8264                         <field name="id" reporter:datatype="id" />
8265                         <field name="source" reporter:datatype="link"/>
8266                         <field name="value" reporter:datatype="text"/>
8267                 </fields>
8268                 <links>
8269                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8270                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8271                 </links>
8272         </class>
8273         <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">
8274                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
8275                         <field name="field" reporter:datatype="link"/>
8276                         <field name="id" reporter:datatype="id" />
8277                         <field name="source" reporter:datatype="link"/>
8278                         <field name="value" reporter:datatype="text"/>
8279                 </fields>
8280                 <links>
8281                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8282                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8283                 </links>
8284         </class>
8285         <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">
8286                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
8287                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
8288                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
8289                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
8290                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
8291                 </fields>
8292                 <links>
8293                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
8294                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
8295                 </links>
8296         </class>
8297         <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">
8298                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
8299                         <field name="depth" reporter:datatype="int" />
8300                         <field name="grantable" reporter:datatype="bool"/>
8301                         <field name="grp" reporter:datatype="link"/>
8302                         <field name="id" reporter:datatype="id" />
8303                         <field name="perm" reporter:datatype="link"/>
8304                 </fields>
8305                 <links>
8306                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8307                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8308                 </links>
8309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8310             <actions>
8311                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
8312                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
8313                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
8314                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
8315             </actions>
8316         </permacrud>
8317         </class>
8318         <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">
8319                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
8320                         <field name="items" oils_persist:virtual="true" />
8321                         <field name="btype" reporter:datatype="text"/>
8322                         <field name="id" reporter:datatype="id" />
8323                         <field name="name" reporter:datatype="text"/>
8324                         <field name="description" reporter:datatype="text"/>
8325                         <field name="owner" reporter:datatype="link"/>
8326                         <field name="pub" reporter:datatype="bool"/>
8327                         <field name="create_time" reporter:datatype="timestamp" />
8328                         <field name="owning_lib" reporter:datatype="org_unit" />
8329                 </fields>
8330                 <links>
8331                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8332                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8333                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
8334                 </links>
8335                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8336                         <actions>
8337                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8338                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8339                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8340                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8341                         </actions>
8342                 </permacrud>
8343         </class>
8344         <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">
8345                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
8346                         <field name="id" reporter:datatype="id" />
8347                         <field name="bucket" reporter:datatype="link"/>
8348                         <field name="note" reporter:datatype="text" />
8349                 </fields>
8350                 <links>
8351                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8352                 </links>
8353         </class>
8354         <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">
8355                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8356                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8357                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8358                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8359                 </fields>
8360                 <links>
8361                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8362                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8363                 </links>
8364         </class>
8365         <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">
8366                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8367                         <field name="depth" reporter:datatype="int"/>
8368                         <field name="grantable" reporter:datatype="bool"/>
8369                         <field name="id" reporter:datatype="id" />
8370                         <field name="perm" reporter:datatype="link"/>
8371                         <field name="usr" reporter:datatype="link"/>
8372                 </fields>
8373                 <links>
8374                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8375                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8376                 </links>
8377         </class>
8378         <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">
8379                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8380                         <field name="object_id" reporter:datatype="text"/>
8381                         <field name="grantable" reporter:datatype="bool"/>
8382                         <field name="id" reporter:datatype="id" />
8383                         <field name="perm" reporter:datatype="link"/>
8384                         <field name="usr" reporter:datatype="link"/>
8385                         <field name="object_type" reporter:datatype="text"/>
8386                 </fields>
8387                 <links>
8388                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8389                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8390                 </links>
8391         </class>
8392         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:label="Payments">
8393                 <fields oils_persist:primary="id" oils_persist:sequence="">
8394                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8395                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8396                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8397                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8398                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8399                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8400                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8401                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8402                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8403                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8404                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8405                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8406                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8407                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8408                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8409                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8410                 </fields>
8411                 <links>
8412                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8413                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8414                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8415                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8416                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8417                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8418                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8419                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8420                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8421                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8422                 </links>
8423         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8424             <actions>
8425                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8426                     <context link="xact" jump="usr" field="home_ou"/>
8427                 </retrieve>
8428                         </actions>
8429                 </permacrud>
8430         </class>
8431         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8432                 oils_obj:fieldmapper="money::aged_payment" 
8433                 oils_persist:tablename="money.aged_payment" 
8434                 reporter:label="Payments: Aged">
8435                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8436                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8437                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8438                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8439                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8440                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8441                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8442                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8443                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8444                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8445                         <field name="billing" reporter:datatype="link"/>
8446                 </fields>
8447                 <links>
8448                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8449                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8450                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8451                         <link field="billing" reltype="has_a" key="id" class="mab"/>
8452                 </links>
8453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8454                         <actions>
8455                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8456                                         <context link="xact" field="usr_home_ou"/>
8457                                 </retrieve>
8458                         </actions>
8459                 </permacrud>
8460         </class>
8461         <class id="mallp" controller="open-ils.cstore" 
8462                 oils_obj:fieldmapper="money::all_payments" 
8463                 oils_persist:tablename="money.all_payments" 
8464                 oils_persist="readonly" reporter:core="true"
8465                 reporter:label="Payments: All">
8466                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8467                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8468                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8469                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8470                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8471                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8472                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8473                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8474                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8475                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8476                         <field name="billing" reporter:datatype="link"/>
8477                 </fields>
8478                 <links>
8479                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8480                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8481                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8482                         <link field="billing" reltype="has_a" key="id" class="mallb"/>
8483                 </links>
8484         </class>
8485
8486         <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">
8487                 <fields oils_persist:primary="id" oils_persist:sequence="">
8488                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8489                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8490                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8491                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8492                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8493                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8494                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8495                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8496                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8497                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8498                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8499                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8500                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8501                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8502                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8503                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8504                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8505                 </fields>
8506                 <links>
8507                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8508                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8509                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8510                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8511                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8512                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8513                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8514                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8515                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8516                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8517                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8518                 </links>
8519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8520                         <actions>
8521                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8522                                         <context link="xact" jump="usr" field="home_ou"/>
8523                                 </retrieve>
8524                         </actions>
8525                 </permacrud>
8526         </class>
8527         <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">
8528                 <fields oils_persist:primary="id" oils_persist:sequence="">
8529                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8530                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8531                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8532                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8533                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8534                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8535                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8536                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8537                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8538                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8539                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8540                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8541                 </fields>
8542                 <links>
8543                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8544                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8545                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8546                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8547                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8548                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8549                 </links>
8550         </class>
8551         <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">
8552                 <fields oils_persist:primary="id" oils_persist:sequence="">
8553                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8554                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8555                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8556                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8557                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8558                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8559                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8560                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8561                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8562                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8563                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8564                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8565                         <field reporter:label="Debit Card Payment" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8566                 </fields>
8567                 <links>
8568                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8569                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8570                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8571                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8572                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8573                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8574                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8575                 </links>
8576         </class>
8577         <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">
8578                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8579                         <field name="bucket" reporter:datatype="link"/>
8580                         <field name="id" reporter:datatype="id" />
8581                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8582                         <field name="create_time" reporter:datatype="timestamp" />
8583                         <field name="pos" reporter:datatype="int" />
8584                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8585                 </fields>
8586                 <links>
8587                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8588                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8589             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8590                 </links>
8591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8592                         <actions>
8593                                 <retrieve permission="ADMIN_COPY_BUCKET">
8594                     <context link="bucket" owning_lib="owning_lib"/>
8595                 </retrieve>
8596             </actions>
8597         </permacrud>
8598         </class>
8599         <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">
8600                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8601                         <field name="id" reporter:datatype="id" />
8602                         <field name="item" reporter:datatype="link"/>
8603                         <field name="note" reporter:datatype="text" />
8604                 </fields>
8605                 <links>
8606                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8607                 </links>
8608         </class>
8609         <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">
8610                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8611                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8612                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8613                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8614                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8615                 </fields>
8616                 <links>
8617                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8618                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8619                 </links>
8620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8621                         <actions>
8622                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8623                         </actions>
8624                 </permacrud>
8625         </class>
8626     <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">
8627         <fields oils_persist:primary="field">
8628             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8629             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8630             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8631         </fields>
8632         <links/>
8633         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8634             <actions>
8635                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8636                 <retrieve />
8637                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8638                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8639             </actions>
8640         </permacrud>
8641     </class>
8642         <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">
8643                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8644                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8645                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8646                 </fields>
8647                 <links/>
8648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8649             <actions>
8650                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8651                 <retrieve/>
8652                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8653                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8654             </actions>
8655         </permacrud>
8656         </class>
8657
8658
8659         <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">
8660                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8661                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8662                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8663                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8664                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8665                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8666                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8667                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8668                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8669                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8670                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8671                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8672                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8673                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8674                 </fields>
8675                 <links>
8676                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8677                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8678                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8679                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8680                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8681                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8682                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8683                 </links>
8684         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8685             <actions>
8686                 <create permission="TRANSIT_COPY">
8687                     <context link="target_copy" field="owner"/>
8688                 </create>
8689                 <retrieve/>
8690                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8691                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8692             </actions>
8693         </permacrud>
8694         </class>
8695         <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">
8696                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8697                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8698                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8699                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8700                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8701                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8702                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8703                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8704                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8705                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8706                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8707                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8708                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8709                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8710                 </fields>
8711                 <links>
8712                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8713                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8714                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8715                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8716                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8717                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8718                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8719                 </links>
8720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8721             <actions>
8722                 <create permission="TRANSIT_COPY" context_field="owner">
8723                     <context link="target_copy" field="circ_lib"/>
8724                 </create>
8725                 <retrieve/>
8726                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8727                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8728             </actions>
8729         </permacrud>
8730         </class>
8731         <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">
8732                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8733                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8734                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8735                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8736                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8737                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8738                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8739                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8740                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8741                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8742                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8743                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8744                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8745                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8746                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8747                 </fields>
8748                 <links>
8749                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8750                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8751                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8752                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8753                 </links>
8754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8755             <actions>
8756                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8757                     <context link="xact" jump="usr" field="home_ou"/>
8758                 </retrieve>
8759                         </actions>
8760                 </permacrud>
8761         </class>
8762         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8763                 oils_obj:fieldmapper="money::aged_billing" 
8764                 oils_persist:tablename="money.aged_billing" 
8765                 reporter:label="Aged Billing Line Item">
8766                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8767                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8768                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8769                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8770                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8771                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8772                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8773                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8774                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8775                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8776                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8777                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8778                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8779                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8780                 </fields>
8781                 <links>
8782                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8783                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8784                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8785                 </links>
8786                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8787                         <actions>
8788                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8789                                         <context link="xact" field="usr_home_ou"/>
8790                                 </retrieve>
8791                         </actions>
8792                 </permacrud>
8793         </class>
8794         <class id="mallb" controller="open-ils.cstore" 
8795                 oils_obj:fieldmapper="money::all_billings" 
8796                 oils_persist:tablename="money.all_billings" 
8797                 oils_persist="readonly" reporter:label="All Billing Line Items">
8798                 <fields oils_persist:primary="id" oils_persist:sequence="">
8799                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8800                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8801                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8802                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8803                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8804                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8805                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8806                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8807                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8808                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8809                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8810                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8811                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8812                 </fields>
8813                 <links>
8814                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8815                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8816                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8817                 </links>
8818         </class>
8819         <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">
8820                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8821                         <field name="grp" />
8822                         <field name="id" reporter:datatype="id" />
8823                         <field name="usr" />
8824                 </fields>
8825                 <links>
8826                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8827                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8828                 </links>
8829         </class>
8830         <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">
8831                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8832                         <field name="id" reporter:datatype="id" />
8833                         <field name="fq_field" reporter:datatype="text"/>
8834                         <field name="identity_value" reporter:datatype="text"/>
8835                         <field name="translation" reporter:datatype="text"/>
8836                         <field name="string" reporter:datatype="text"/>
8837                 </fields>
8838                 <links>
8839                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8840                 </links>
8841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8842             <actions>
8843                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8844                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8845                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8846                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8847             </actions>
8848         </permacrud>
8849         </class>
8850         <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">
8851                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8852                         <field name="id" reporter:datatype="id" />
8853                         <field name="fm_class" reporter:datatype="text"/>
8854                         <field name="field" reporter:datatype="text"/>
8855                         <field name="owner" reporter:datatype="org_unit"/>
8856                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8857                 </fields>
8858                 <links>
8859                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8860                 </links>
8861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8862             <actions>
8863                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8864                 <retrieve/>
8865                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8866                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8867             </actions>
8868         </permacrud>
8869         </class>
8870         <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">
8871                 <fields oils_persist:primary="code">
8872                         <field name="code" reporter:datatype="id" />
8873                         <field name="marc_code" reporter:datatype="text"/>
8874                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8875                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8876                         <field name="rtl" reporter:datatype="bool"/>
8877                 </fields>
8878                 <links/>
8879         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8880             <actions>
8881                 <create permission="CREATE_LOCALE" global_required="true"/>
8882                 <retrieve/>
8883                 <update permission="UPDATE_LOCALE" global_required="true"/>
8884                 <delete permission="DELETE_LOCALE" global_required="true"/>
8885             </actions>
8886         </permacrud>
8887         </class>
8888         <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">
8889                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8890                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
8891                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
8892                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
8893                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8894                 </fields>
8895                 <links>
8896                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8897                 </links>
8898         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8899             <actions>
8900                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8901                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8902                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8903                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8904             </actions>
8905         </permacrud>
8906         </class>
8907
8908         <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">
8909                 <fields oils_persist:primary="id">
8910                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8911                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8912                 </fields>
8913                 <links/>
8914         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8915             <actions>
8916                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8917                 <retrieve/>
8918                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8919                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8920             </actions>
8921         </permacrud>
8922         </class>
8923
8924         <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">
8925                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8926                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8927                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8928                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8929                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8930                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8931                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8932                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8933                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8934                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8935                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8936                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8937                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8938                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8939                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8940                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8941                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8942                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8943                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8944                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8945                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8946                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8947                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8948                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8949                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8950                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8951                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8952                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8953                 </fields>
8954                 <links>
8955                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8956                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8957                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8958                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8959                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8960                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8961                 </links>
8962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8963             <actions>
8964                 <create permission="user_request.create">
8965                     <context link="usr" field="home_ou"/>
8966                                 </create>
8967                 <retrieve permission="user_request.view">
8968                     <context link="usr" field="home_ou"/>
8969                                 </retrieve>
8970                 <update permission="user_request.update">
8971                     <context link="usr" field="home_ou"/>
8972                                 </update>
8973                 <delete permission="user_request.delete">
8974                     <context link="usr" field="home_ou"/>
8975                                 </delete>
8976             </actions>
8977         </permacrud>
8978         </class>
8979
8980         <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">
8981         <oils_persist:source_definition><![CDATA[
8982             SELECT r.*, CASE
8983                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
8984                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
8985                         WHEN l.state = 'received' THEN 5 -- Received
8986                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
8987                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
8988                         WHEN l.id IS NOT NULL THEN 2 -- Pending
8989                         WHEN l.id IS NULL THEN 1 -- New
8990                         ELSE 0 -- Error
8991                     END AS request_status
8992                     ,u.home_ou
8993             FROM      acq.user_request r
8994             JOIN actor.usr u ON (r.usr = u.id)
8995             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
8996             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
8997             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
8998         ]]></oils_persist:source_definition>
8999                 <fields oils_persist:primary="id">
9000                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9001                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9002                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
9003                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
9004                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
9005                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
9006                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
9007                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
9008                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9009                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
9010                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
9011                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
9012                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
9013                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
9014                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
9015                         <field reporter:label="Title" name="title" reporter:datatype="text" />
9016                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
9017                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9018                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
9019                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
9020                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
9021                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
9022                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
9023                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9024                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9025                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9026                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9027                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
9028                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
9029                 </fields>
9030                 <links>
9031                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9032                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9033                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9034                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9035                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9036                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9037                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
9038                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9039                 </links>
9040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9041             <actions>
9042                 <retrieve permission="user_request.view">
9043                     <context link="usr" field="home_ou"/>
9044                                 </retrieve>
9045             </actions>
9046         </permacrud>
9047         </class>
9048
9049         <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">
9050                 <fields oils_persist:primary="id">
9051                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9052                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9053                 </fields>
9054                 <links/>
9055         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9056             <actions>
9057                 <retrieve/>
9058             </actions>
9059         </permacrud>
9060         </class>
9061
9062         <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">
9063                 <fields oils_persist:primary="code">
9064                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
9065                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9066                 </fields>
9067                 <links/>
9068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9069             <actions>
9070                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9071                 <retrieve/>
9072                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9073                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9074             </actions>
9075         </permacrud>
9076         </class>
9077
9078         <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">
9079                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
9080                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
9081                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
9082                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
9083                         <field reporter:label="Ratio" name="ratio" />
9084                 </fields>
9085                 <links>
9086                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
9087                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
9088                 </links>
9089                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9090                         <actions>
9091                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9092                                 <retrieve/>
9093                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9094                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9095                         </actions>
9096                 </permacrud>
9097         </class>
9098
9099         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
9100                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
9101                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9102                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9103                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
9104                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true"/>
9105                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
9106                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
9107                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
9108                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
9109                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
9110                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9111                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9112                         <field reporter:label="URL" name="url" reporter:datatype="text" />
9113                         <field reporter:label="Email" name="email" reporter:datatype="text" />
9114                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
9115                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
9116                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
9117                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
9118                         <field reporter:label="Primary Contact" name="primary_contact" reporter:datatype="link" />
9119                         <field reporter:label="Contacts" name="contacts" oils_persist:virtual="true" reporter:datatype="link" />
9120                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
9121                         <field reporter:label="Holdings Subfields" name="holdings_subfields" oils_persist:virtual="true" reporter:datatype="link" />
9122                         <field reporter:label="Attribute Definitions" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9123                         <field reporter:label="EDI Accounts" name="edi_accounts" oils_persist:virtual="true" reporter:datatype="link" />
9124                 </fields>
9125                 <links>
9126                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9127                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9128                         <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
9129                         <link field="contacts" reltype="has_many" map="" key="provider" class="acqpc"/>
9130                         <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
9131                         <link field="primary_contact" reltype="has_a" map="" key="id" class="acqpc"/>
9132                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
9133                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
9134                         <link field="holdings_subfields" reltype="has_many" map="" key="provider" class="acqphsm"/>
9135                         <link field="attributes" reltype="has_many" map="" key="provider" class="acqlipad"/>
9136                         <link field="edi_accounts" reltype="has_many" map="" key="provider" class="acqedi"/>
9137                 </links>
9138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9139             <actions>
9140                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
9141                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
9142                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
9143                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
9144             </actions>
9145         </permacrud>
9146         </class>
9147
9148         <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">
9149                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
9150                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9151                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9152                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9153                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9154                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9155                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9156                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9157                 </fields>
9158                 <links>
9159                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9160                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9161                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9162                 </links>
9163         </class>
9164
9165         <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">
9166                 <fields oils_persist:primary="code">
9167                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
9168                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9169                 </fields>
9170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9171             <actions>
9172                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9173                 <retrieve/>
9174                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9175                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9176             </actions>
9177                 </permacrud>
9178         </class>
9179
9180         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
9181                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
9182                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
9183                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
9184                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9185                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
9186                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
9187                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
9188                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
9189                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
9190                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
9191                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
9192                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9193                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
9194                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
9195                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
9196                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
9197                 </fields>
9198                 <links>
9199                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
9200                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9201                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
9202                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
9203                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
9204                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
9205                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
9206                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
9207                 </links>
9208         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9209             <actions>
9210                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
9211                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
9212                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
9213                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
9214             </actions>
9215         </permacrud>
9216         </class>
9217
9218         <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">
9219                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
9220                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9221                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9222                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9223                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
9224                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
9225                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
9226                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9227                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
9228                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9229                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9230                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9231                 </fields>
9232                 <links>
9233                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9234                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9235                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9236                 </links>
9237         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9238             <actions>
9239                 <create   permission="ADMIN_INVOICE">
9240                                         <context link="invoice" field="receiver"/>
9241                                 </create>
9242                 <retrieve permission="ADMIN_INVOICE">
9243                                         <context link="invoice" field="receiver"/>
9244                                 </retrieve>
9245                 <update   permission="ADMIN_INVOICE">
9246                                         <context link="invoice" field="receiver"/>
9247                                 </update>
9248                                 <delete   permission="ADMIN_INVOICE">
9249                                         <context link="invoice" field="receiver"/>
9250                                 </delete>
9251             </actions>
9252         </permacrud>
9253         </class>
9254
9255         <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">
9256                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
9257                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9258                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9259                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9260                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9261                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
9262                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
9263                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9264                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9265                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9266                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9267                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9268                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9269                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
9270                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9271                 </fields>
9272                 <links>
9273                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9274                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9275                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9276                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9277                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9278                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
9279                 </links>
9280         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9281             <actions>
9282                 <create   permission="ADMIN_INVOICE">
9283                                         <context link="invoice" field="receiver"/>
9284                                 </create>
9285                 <retrieve permission="ADMIN_INVOICE">
9286                                         <context link="invoice" field="receiver"/>
9287                                 </retrieve>
9288                 <update   permission="ADMIN_INVOICE">
9289                                         <context link="invoice" field="receiver"/>
9290                                 </update>
9291                                 <delete   permission="ADMIN_INVOICE">
9292                                         <context link="invoice" field="receiver"/>
9293                                 </delete>
9294             </actions>
9295         </permacrud>
9296         </class>
9297
9298         <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">
9299                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
9300                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
9301                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9302                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9303                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9304                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9305                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9306                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text" oils_obj:required="true"/>
9307                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9308                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9309                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
9310                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
9311                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9312                 </fields>
9313                 <links>
9314                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9315                 </links>
9316         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9317             <actions>
9318                 <create permission="ADMIN_PROVIDER">
9319                     <context link="provider" field="owner"/>
9320                 </create>
9321                 <retrieve permission="ADMIN_PROVIDER">
9322                     <context link="provider" field="owner"/>
9323                 </retrieve>
9324                 <update permission="ADMIN_PROVIDER">
9325                     <context link="provider" field="owner"/>
9326                 </update>
9327                 <delete permission="ADMIN_PROVIDER">
9328                     <context link="provider" field="owner"/>
9329                 </delete>
9330             </actions>
9331         </permacrud>
9332         </class>
9333
9334         <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">
9335                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
9336                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9337                         <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true"/>
9338                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9339                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
9340                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
9341                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
9342                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
9343         </fields>
9344                 <links>
9345                         <link field="addresses" reltype="has_many" key="contact" map="" class="acqpca"/>
9346                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9347                 </links>
9348         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9349             <actions>
9350                 <create permission="ADMIN_PROVIDER">
9351                     <context link="provider" field="owner"/>
9352                 </create>
9353                 <retrieve permission="ADMIN_PROVIDER">
9354                     <context link="provider" field="owner"/>
9355                 </retrieve>
9356                 <update permission="ADMIN_PROVIDER">
9357                     <context link="provider" field="owner"/>
9358                 </update>
9359                 <delete permission="ADMIN_PROVIDER">
9360                     <context link="provider" field="owner"/>
9361                 </delete>
9362             </actions>
9363         </permacrud>
9364     </class>
9365         <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">
9366                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
9367                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
9368                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9369                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9370                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9371                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
9372                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text" oils_obj:required="true"/>
9373                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9374                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9375                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
9376                         <field reporter:label="Contact" name="contact" reporter:datatype="link" oils_obj:required="true"/>
9377                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
9378                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9379                 </fields>
9380                 <links>
9381                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9382                 </links>
9383         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9384             <actions>
9385                 <create permission="ADMIN_PROVIDER">
9386                     <context link="contact" jump='provider' field="owner"/>
9387                 </create>
9388                 <retrieve permission="ADMIN_PROVIDER">
9389                     <context link="contact" jump='provider' field="owner"/>
9390                 </retrieve>
9391                 <update permission="ADMIN_PROVIDER">
9392                     <context link="contact" jump='provider' field="owner"/>
9393                 </update>
9394                 <delete permission="ADMIN_PROVIDER">
9395                     <context link="contact" jump='provider' field="owner"/>
9396                 </delete>
9397             </actions>
9398         </permacrud>
9399         </class>
9400
9401         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
9402                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9403                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9404                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9405                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9406                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9407                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9408                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9409                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9410                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9411                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9412                 </fields>
9413                 <links>
9414                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9415                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9416                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9417                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9418                 </links>
9419         </class>
9420
9421         <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">
9422                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9423                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9424                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9425                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9426                 </fields>
9427                 <links>
9428             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9429                 </links>
9430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9431                         <actions>
9432                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9433                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9434                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9435                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9436                         </actions>
9437                 </permacrud>
9438         </class>
9439
9440         <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">
9441                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9442                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9443                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9444                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9445                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9446                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9447                 </fields>
9448                 <links>
9449                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9450                 </links>
9451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9452                         <actions>
9453                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9454                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9455                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9456                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9457                         </actions>
9458                 </permacrud>
9459         </class>
9460
9461         <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">
9462                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9463                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9464                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9465                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
9466                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
9467                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9468                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9469                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9470                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9471                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9472                 </fields>
9473                 <links>
9474                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9475                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9476             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9477             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9478                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9479                 </links>
9480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9481             <actions>
9482                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9483                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9484                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9485                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9486             </actions>
9487         </permacrud>
9488         </class>
9489
9490         <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">
9491                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9492                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9493                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
9494                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9495                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9496                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9497                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9498                 </fields>
9499                 <links>
9500                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9501                 </links>
9502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9503                         <actions>
9504                                 <create permission="ADMIN_FUNDING_SOURCE">
9505                     <context link="funding_source" field="owner"/>
9506                 </create>
9507                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9508                     <context link="funding_source" field="owner"/>
9509                 </retrieve>
9510                                 <update permission="ADMIN_FUNDING_SOURCE">
9511                     <context link="funding_source" field="owner"/>
9512                 </update>
9513                                 <delete permission="ADMIN_FUNDING_SOURCE">
9514                     <context link="funding_source" field="owner"/>
9515                 </delete>
9516                         </actions>
9517                 </permacrud>
9518         </class>
9519
9520         <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">
9521                 <fields oils_persist:primary="id">
9522                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9523                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9524                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9525                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9526                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9527                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9528                 </fields>
9529                 <links>
9530                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9531                 </links>
9532         </class>
9533
9534         <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">
9535                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9536                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9537                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9538                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9539                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9540                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9541                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9542                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9543                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9544                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9545                 </fields>
9546                 <links>
9547                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9548                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9549                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9550                 </links>
9551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9552                         <actions>
9553                                 <create permission="ADMIN_ACQ_FUND">
9554                     <context link="fund" field="org"/>
9555                 </create>
9556                                 <retrieve permission="ADMIN_ACQ_FUND">
9557                     <context link="fund" field="org"/>
9558                 </retrieve>
9559                                 <update permission="ADMIN_ACQ_FUND">
9560                     <context link="fund" field="org"/>
9561                 </update>
9562                                 <delete permission="ADMIN_ACQ_FUND">
9563                     <context link="fund" field="org"/>
9564                 </delete>
9565                         </actions>
9566                 </permacrud>
9567         </class>
9568
9569         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9570                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9571                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9572                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9573                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9574                         <field reporter:label="Year" name="year" reporter:datatype="int" />
9575                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9576                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9577                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9578                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9579                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9580                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9581                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9582                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9583                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9584                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9585                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9586                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9587                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9588                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9589                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9590                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9591                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9592                 </fields>
9593                 <links>
9594                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9595                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9596             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9597             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9598             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9599             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9600             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9601             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9602             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9603             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9604             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9605                 </links>
9606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9607             <actions>
9608                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9609                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9610                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9611                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9612             </actions>
9613         </permacrud>
9614         </class>
9615
9616         <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">
9617                 <fields oils_persist:primary="fund">
9618                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9619                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9620                 </fields>
9621                 <links>
9622                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9623                 </links>
9624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9625             <actions>
9626                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9627                                         <context link="fund" field="org" />
9628                 </retrieve>
9629             </actions>
9630         </permacrud>
9631         </class>
9632
9633         <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">
9634                 <fields oils_persist:primary="fund">
9635                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9636                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9637                 </fields>
9638                 <links>
9639                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9640                 </links>
9641         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9642             <actions>
9643                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9644                                         <context link="fund" field="org" />
9645                 </retrieve>
9646             </actions>
9647         </permacrud>
9648         </class>
9649
9650         <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">
9651                 <fields oils_persist:primary="fund">
9652                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9653                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9654                 </fields>
9655                 <links>
9656                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9657                 </links>
9658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9659             <actions>
9660                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9661                                         <context link="fund" field="org" />
9662                 </retrieve>
9663             </actions>
9664         </permacrud>
9665         </class>
9666
9667         <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">
9668                 <fields oils_persist:primary="fund">
9669                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9670                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9671                 </fields>
9672                 <links>
9673                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9674                 </links>
9675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9676             <actions>
9677                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9678                                         <context link="fund" field="org" />
9679                 </retrieve>
9680             </actions>
9681         </permacrud>
9682         </class>
9683
9684         <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">
9685                 <fields oils_persist:primary="fund">
9686                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9687                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9688                 </fields>
9689                 <links>
9690                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9691                 </links>
9692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9693             <actions>
9694                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9695                                         <context link="fund" field="org" />
9696                 </retrieve>
9697             </actions>
9698         </permacrud>
9699         </class>
9700
9701    <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">
9702         <fields oils_persist:primary="fund">
9703             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9704             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9705         </fields>
9706         <links>
9707             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9708         </links>
9709     </class>
9710
9711    <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">
9712         <fields oils_persist:primary="fund">
9713             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9714             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9715         </fields>
9716         <links>
9717             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9718         </links>
9719     </class>
9720
9721    <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">
9722         <fields oils_persist:primary="fund">
9723             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9724             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9725         </fields>
9726         <links>
9727             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9728         </links>
9729     </class>
9730
9731    <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">
9732         <fields oils_persist:primary="fund">
9733             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9734             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9735         </fields>
9736         <links>
9737             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9738         </links>
9739     </class>
9740
9741    <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">
9742         <fields oils_persist:primary="fund">
9743             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9744             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9745         </fields>
9746         <links>
9747             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9748         </links>
9749     </class>
9750
9751         <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">
9752                 <fields oils_persist:primary="funding_source">
9753                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9754                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9755                 </fields>
9756                 <links>
9757                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9758                 </links>
9759         </class>
9760
9761         <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">
9762                 <fields oils_persist:primary="funding_source">
9763                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9764                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9765                 </fields>
9766                 <links>
9767                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9768                 </links>
9769         </class>
9770
9771         <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">
9772                 <fields oils_persist:primary="funding_source">
9773                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9774                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9775                 </fields>
9776                 <links>
9777                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9778                 </links>
9779         </class>
9780
9781         <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">
9782                 <fields oils_persist:primary="fund">
9783                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9784                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9785                 </fields>
9786                 <links>
9787                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9788                 </links>
9789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9790             <actions>
9791                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9792                                         <context link="fund" field="org" />
9793                 </retrieve>
9794             </actions>
9795         </permacrud>
9796     </class>
9797     <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">
9798         <oils_persist:source_definition><![CDATA[
9799             SELECT
9800                 acqf.*,
9801                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9802                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9803                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9804                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9805             FROM
9806                 acq.fund acqf
9807                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9808                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9809                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9810                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9811         ]]></oils_persist:source_definition>
9812         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9813             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9814             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9815             <field reporter:label="Name" name="name" reporter:datatype="text" />
9816             <field reporter:label="Year" name="year" reporter:datatype="int" />
9817             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9818             <field reporter:label="Code" name="code" reporter:datatype="text" />
9819             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9820             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9821             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9822             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9823             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9824
9825             <!-- non fund-native fields -->
9826             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9827             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9828             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9829             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9830         </fields>
9831         <links>
9832             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9833             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9834             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9835         </links>
9836         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9837             <actions>
9838                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9839             </actions>
9840         </permacrud>
9841         </class>
9842         <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">
9843                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9844                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9845                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9846                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9847                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9848                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9849                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9850                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9851                 </fields>
9852                 <links>
9853                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9854                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9855                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9856                 </links>
9857                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9858                         <actions>
9859                                 <create permission="ADMIN_ACQ_FUND">
9860                     <context link="fund" field="org"/>
9861                 </create>
9862                                 <retrieve permission="ADMIN_ACQ_FUND">
9863                     <context link="fund" field="org"/>
9864                 </retrieve>
9865                                 <update permission="ADMIN_ACQ_FUND">
9866                     <context link="fund" field="org"/>
9867                 </update>
9868                                 <delete permission="ADMIN_ACQ_FUND">
9869                     <context link="fund" field="org"/>
9870                 </delete>
9871                         </actions>
9872                 </permacrud>
9873         </class>
9874
9875     <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">
9876         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9877             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9878             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9879             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9880             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9881             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9882             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9883             <field reporter:label="Note" name="note" reporter:datatype="text" />
9884             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9885         </fields>
9886         <links>
9887             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9888             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9889             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9890         </links>
9891                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9892                         <actions>
9893                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9894                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9895                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9896                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9897                         </actions>
9898                 </permacrud>
9899     </class>
9900
9901         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9902                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9903                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9904                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9905                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9906                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9907                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9908                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9909                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9910                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9911                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9912                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9913                 </fields>
9914                 <links>
9915                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9916                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9917                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9918                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9919                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9920                 </links>
9921                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9922                         <actions>
9923                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9924                         </actions>
9925                 </permacrud>
9926         </class>
9927
9928         <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">
9929                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9930                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9931                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9932                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9933                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9934                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9935                 </fields>
9936                 <links>
9937                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9938                 </links>
9939                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9940                         <actions>
9941                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9942                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9943                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9944                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9945                         </actions>
9946                 </permacrud>
9947         </class>
9948
9949         <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">
9950                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9951                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9952                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9953                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9954                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9955                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9956                         <field reporter:label="Status" name="state" reporter:datatype="link" />
9957                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9958                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9959                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9960                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9961                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9962                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9963                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9964                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9965                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9966                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9967                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9968                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9969                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9970                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9971                 </fields>
9972                 <links>
9973                         <link field="state" reltype="has_a" key="id" map="" class="acqpostlbl"/>
9974                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9975                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9976                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9977                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9978                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9979                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9980                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9981                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9982                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9983                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9984                 </links>
9985                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9986                         <actions>
9987                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9988                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9989                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9990                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9991                         </actions>
9992                 </permacrud>
9993         </class>
9994
9995         <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">
9996                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9997                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9998                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9999                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10000                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
10001                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10002                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10003                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10004                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10005                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10006                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10007                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10008                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10009                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
10010                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10011                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10012                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10013                 </fields>
10014                 <links>
10015                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
10016                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10017                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10018                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10019                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10020                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10021                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10022                 </links>
10023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10024             <actions>
10025                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10026             </actions>
10027                 </permacrud>
10028         </class>
10029
10030         <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">
10031                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
10032                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
10033                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10034                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10035                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10036                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10037                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10038                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
10039                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10040                 </fields>
10041                 <links>
10042                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10043                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10044                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10045                 </links>
10046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10047             <actions>
10048                 <create permission="CREATE_PURCHASE_ORDER">
10049                     <context link="purchase_order" field="ordering_agency"/>
10050                 </create>
10051                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10052                     <context link="purchase_order" field="ordering_agency"/>
10053                 </retrieve>
10054                 <update permission="CREATE_PURCHASE_ORDER">
10055                     <context link="purchase_order" field="ordering_agency"/>
10056                 </update>
10057                 <delete permission="CREATE_PURCHASE_ORDER">
10058                     <context link="purchase_order" field="ordering_agency"/>
10059                 </delete>
10060             </actions>
10061                 </permacrud>
10062         </class>
10063
10064         <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">
10065                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
10066                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10067                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10068                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10069                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
10070                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
10071                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
10072                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10073                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
10074                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10075                         <field reporter:label="Target" name="target" reporter:datatype="int" />
10076                 </fields>
10077                 <links>
10078                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10079                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10080                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
10081                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10082                 </links>
10083                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10084             <actions>
10085                 <create permission="CREATE_PURCHASE_ORDER">
10086                     <context link="purchase_order" field="ordering_agency"/>
10087                 </create>
10088                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10089                     <context link="purchase_order" field="ordering_agency"/>
10090                 </retrieve>
10091                 <update permission="CREATE_PURCHASE_ORDER">
10092                     <context link="purchase_order" field="ordering_agency"/>
10093                 </update>
10094                 <delete permission="CREATE_PURCHASE_ORDER">
10095                     <context link="purchase_order" field="ordering_agency"/>
10096                 </delete>
10097             </actions>
10098                 </permacrud>
10099         </class>
10100
10101         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
10102                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
10103                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
10104                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
10105                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
10106                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10107                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10108                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10109                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10110                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
10111                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
10112                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
10113                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
10114                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10115                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10116                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10117                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
10118                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10119                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10120                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10121                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
10122                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
10123                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
10124                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
10125                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
10126                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
10127                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
10128                 </fields>
10129                 <links>
10130                         <link field="state" reltype="has_a" key="id" map="" class="jubstlbl"/>
10131                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10132                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10133                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10134                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10135                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10136                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10137                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10138                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
10139                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
10140                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
10141                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10142                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
10143                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10144                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
10145                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
10146                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10147                 </links>
10148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10149                         <actions>
10150                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10151                                         <context link="purchase_order" field="ordering_agency"/>
10152                                         <context link="picklist" field="org_unit"/>
10153                                 </retrieve>
10154                         </actions>
10155                 </permacrud>
10156         </class>
10157
10158         <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">
10159                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
10160                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10161                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10162                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10163                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
10164                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10165                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10166                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
10167                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10168                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10169                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
10170                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
10171                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10172                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10173                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
10174                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
10175                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
10176                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10177                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
10178                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10179                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10180                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10181                 </fields>
10182                 <links>
10183                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
10184                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10185                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10186                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10187                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10188                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10189                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10190                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10191                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10192                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10193                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10194                 </links>
10195                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10196                         <actions>
10197                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10198                                         <context link="purchase_order" field="ordering_agency"/>
10199                                         <context link="picklist" field="org_unit"/>
10200                                 </retrieve>
10201                         </actions>
10202                 </permacrud>
10203         </class>
10204
10205         <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">
10206                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
10207                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
10208                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10209                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10210                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10211                 </fields>
10212                 <links>
10213                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10214                 </links>
10215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10216                         <actions>
10217                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10218                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
10219                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10220                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10221                         </actions>
10222                 </permacrud>
10223         </class>
10224
10225         <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">
10226                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
10227                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
10228                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
10229                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10230                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10231                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10232                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10233                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
10234                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
10235                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10236                 </fields>
10237                 <links>
10238                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10239                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10240                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10241                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
10242                 </links>
10243         </class>
10244
10245         <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">
10246                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
10247                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
10248                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
10249                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
10250                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
10251                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
10252                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
10253                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
10254                 </fields>
10255                 <links>
10256                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10257                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
10258                 </links>
10259         </class>
10260
10261         <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">
10262                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
10263                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
10264                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
10265                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
10266                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
10267                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
10268                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
10269                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
10270                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
10271                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
10272                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10273                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
10274                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
10275                         <field reporter:label="Note" name="note" reporter:datatype="text" />
10276                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
10277                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10278                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
10279                 </fields>
10280                 <links>
10281                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10282                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
10283                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10284                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10285                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10286                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10287                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10288                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10289                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
10290                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
10291                 </links>
10292         </class>
10293
10294         <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">
10295                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10296                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10297                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10298                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10299                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10300                 </fields>
10301                 <links/>
10302                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10303                         <actions>
10304                                 <retrieve />
10305                         </actions>
10306                 </permacrud>
10307         </class>
10308
10309         <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">
10310                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10311                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10312                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10313                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10314                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10315                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10316             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10317                 </fields>
10318                 <links/>
10319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10320             <actions>
10321                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10322                 <retrieve />
10323                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10324                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10325             </actions>
10326         </permacrud>
10327         </class>
10328
10329         <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">
10330                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10331                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10332                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10333                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10334                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10335                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10336                 </fields>
10337                 <links/>
10338         </class>
10339         <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">
10340                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10341                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10342                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10343                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10344                         <field reporter:label="User" name="usr" reporter:datatype="link" />
10345                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10346                 </fields>
10347                 <links>
10348                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10349                 </links>
10350         </class>
10351
10352         <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">
10353             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10354                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10355                 <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true" />
10356                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
10357                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true" />
10358                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10359                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10360         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10361
10362             </fields>
10363             <links>
10364                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10365             </links>
10366             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10367                 <actions>
10368                     <create permission="ADMIN_PROVIDER">
10369                         <context link="provider" field="owner"/>
10370                     </create>
10371                     <retrieve permission="ADMIN_PROVIDER">
10372                         <context link="provider" field="owner"/>
10373                     </retrieve>
10374                     <update permission="ADMIN_PROVIDER">
10375                         <context link="provider" field="owner"/>
10376                     </update>
10377                     <delete permission="ADMIN_PROVIDER">
10378                         <context link="provider" field="owner"/>
10379                     </delete>
10380                 </actions>
10381             </permacrud>
10382         </class>
10383         
10384         <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">
10385             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10386                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10387                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10388                 <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
10389                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" oils_obj:required="true" />
10390             </fields>
10391             <links>
10392                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10393             </links>
10394             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10395                 <actions>
10396                     <create permission="ADMIN_PROVIDER">
10397                         <context link="provider" field="owner"/>
10398                     </create>
10399                     <retrieve permission="ADMIN_PROVIDER">
10400                         <context link="provider" field="owner"/>
10401                     </retrieve>
10402                     <update permission="ADMIN_PROVIDER">
10403                         <context link="provider" field="owner"/>
10404                     </update>
10405                     <delete permission="ADMIN_PROVIDER">
10406                         <context link="provider" field="owner"/>
10407                     </delete>
10408                 </actions>
10409             </permacrud>
10410         </class>
10411         
10412         <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">
10413             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10414                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10415                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10416                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10417                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10418                 </fields>
10419                 <links/>
10420         </class>
10421
10422         <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">
10423                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10424                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10425                         <field name="label"         reporter:datatype="text"      reporter:label="Label" oils_obj:required="true"/>
10426                         <field name="host"          reporter:datatype="text"      reporter:label="Host" oils_obj:required="true"/>
10427                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10428                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10429                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10430                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10431                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner" oils_obj:required="true"/>
10432                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10433                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider" oils_obj:required="true"/>
10434                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10435                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10436                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10437                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10438                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes" oils_obj:required="true"/>
10439                 </fields>
10440                 <links>
10441                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10442                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10443                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10444                 </links>
10445         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10446             <actions>
10447                 <create permission="ADMIN_PROVIDER">
10448                     <context link="provider" field="owner"/>
10449                 </create>
10450                 <retrieve permission="ADMIN_PROVIDER">
10451                     <context link="provider" field="owner"/>
10452                 </retrieve>
10453                 <update permission="ADMIN_PROVIDER">
10454                     <context link="provider" field="owner"/>
10455                 </update>
10456                 <delete permission="ADMIN_PROVIDER">
10457                     <context link="provider" field="owner"/>
10458                 </delete>
10459             </actions>
10460         </permacrud>
10461         </class>
10462
10463         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10464                 oils_obj:fieldmapper="acq::edi_attr" 
10465                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10466                 <fields oils_persist:primary="key">
10467                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10468                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10469                 </fields>
10470         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10471             <actions>
10472                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10473                 <retrieve/>
10474                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10475                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10476             </actions>
10477         </permacrud>
10478         </class>
10479         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10480                 oils_obj:fieldmapper="acq::edi_attr_set" 
10481                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10482                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10483                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10484                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10485                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10486                 </fields>
10487                 <links>
10488                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10489                 </links>
10490         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10491             <actions>
10492                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10493                 <retrieve/>
10494                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10495                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10496             </actions>
10497         </permacrud>
10498         </class>
10499         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10500                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10501                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10502                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10503                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10504                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10505                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10506                 </fields>
10507                 <links>
10508                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10509                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10510                 </links>
10511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10512             <actions>
10513                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10514                 <retrieve/>
10515                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10516                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10517             </actions>
10518         </permacrud>
10519         </class>
10520
10521
10522         <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">
10523                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10524                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10525                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10526                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10527                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10528                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10529                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10530                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10531                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10532                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10533                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10534                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10535                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10536                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10537                 </fields>
10538                 <links>
10539                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10540                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10541                 </links>
10542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10543             <actions>
10544                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10545                     <context link="account" jump="provider" field="owner"/>
10546                 </retrieve>
10547                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10548                     <context link="account" jump="provider" field="owner"/>
10549                 </update>
10550                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10551                     <context link="account" jump="provider" field="owner"/>
10552                 </delete>
10553             </actions>
10554         </permacrud>
10555         </class>
10556
10557
10558         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10559                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10560                         <field name="id" reporter:datatype="id" />
10561                         <field name="parent" reporter:datatype="link"/>
10562                         <field name="owner" reporter:datatype="link"/>
10563                         <field name="create_time" reporter:datatype="timestamp"/>
10564                         <field name="name" reporter:datatype="text"/>
10565                         <field name="shared" reporter:datatype="bool"/>
10566                         <field name="share_with" reporter:datatype="link"/>
10567                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10568                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10569                 </fields>
10570                 <links>
10571                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10572                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10573                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10574                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10575                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10576                 </links>
10577         </class>
10578         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10579                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10580                         <field name="id" reporter:datatype="id" />
10581                         <field name="parent" reporter:datatype="link"/>
10582                         <field name="owner" reporter:datatype="link"/>
10583                         <field name="create_time" reporter:datatype="timestamp"/>
10584                         <field name="name" reporter:datatype="text"/>
10585                         <field name="shared" reporter:datatype="bool"/>
10586                         <field name="share_with" reporter:datatype="link"/>
10587                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10588                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10589                 </fields>
10590                 <links>
10591                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10592                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10593                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10594                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10595                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10596                 </links>
10597         </class>
10598         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10599                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10600                         <field name="id" reporter:datatype="id" />
10601                         <field name="parent" reporter:datatype="link"/>
10602                         <field name="owner" reporter:datatype="link"/>
10603                         <field name="create_time" reporter:datatype="timestamp"/>
10604                         <field name="name" reporter:datatype="text"/>
10605                         <field name="shared" reporter:datatype="bool"/>
10606                         <field name="share_with" reporter:datatype="link"/>
10607                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10608                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10609                 </fields>
10610                 <links>
10611                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10612                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10613                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10614                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10615                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10616                 </links>
10617         </class>
10618         <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">
10619                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10620                         <field name="id" reporter:datatype="id" />
10621                         <field name="owner" reporter:datatype="link"/>
10622                         <field name="create_time" reporter:datatype="timestamp"/>
10623                         <field name="name" reporter:datatype="text"/>
10624                         <field name="data" reporter:datatype="text"/>
10625                         <field name="folder" reporter:datatype="link"/>
10626                         <field name="description" reporter:datatype="text"/>
10627                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10628                 </fields>
10629                 <links>
10630                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10631                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10632                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10633                 </links>
10634         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10635             <actions>
10636                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10637                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10638                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10639                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10640             </actions>
10641         </permacrud>
10642         </class>
10643         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10644                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10645                         <field name="id" reporter:datatype="id" />
10646                         <field name="owner" reporter:datatype="link"/>
10647                         <field name="create_time" reporter:datatype="timestamp"/>
10648                         <field name="template" reporter:datatype="link"/>
10649                         <field name="data" reporter:datatype="text"/>
10650                         <field name="folder" reporter:datatype="link"/>
10651                         <field name="recur" reporter:datatype="bool"/>
10652                         <field name="recurrence" reporter:datatype="interval"/>
10653                         <field name="name" reporter:datatype="text"/>
10654                         <field name="description" reporter:datatype="text"/>
10655                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10656                 </fields>
10657                 <links>
10658                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10659                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10660                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10661                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10662                 </links>
10663         </class>
10664         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10665                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10666                         <field name="id" reporter:datatype="id" />
10667                         <field name="runner" reporter:datatype="link"/>
10668                         <field name="start_time" reporter:datatype="timestamp"/>
10669                         <field name="complete_time" reporter:datatype="timestamp"/>
10670                         <field name="run_time" reporter:datatype="timestamp"/>
10671                         <field name="email" reporter:datatype="text"/>
10672                         <field name="excel_format" reporter:datatype="bool"/>
10673                         <field name="csv_format" reporter:datatype="bool"/>
10674                         <field name="html_format" reporter:datatype="bool"/>
10675                         <field name="error_code" reporter:datatype="int"/>
10676                         <field name="error_text" reporter:datatype="text"/>
10677                         <field name="report" reporter:datatype="link"/>
10678                         <field name="folder" reporter:datatype="link"/>
10679                         <field name="chart_pie" reporter:datatype="bool"/>
10680                         <field name="chart_bar" reporter:datatype="bool"/>
10681                         <field name="chart_line" reporter:datatype="bool"/>
10682                 </fields>
10683                 <links>
10684                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10685                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10686                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10687                 </links>
10688         </class>
10689         <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">
10690                 <fields oils_persist:primary="id">
10691                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10692                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10693                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10694                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10695                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10696                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10697                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10698                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10699                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10700                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10701                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10702                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10703                 </fields>
10704                 <links>
10705                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10706                 </links>
10707                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10708                         <actions>
10709                                 <retrieve />
10710                         </actions>
10711                 </permacrud>
10712         </class>
10713         <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">
10714                 <fields oils_persist:primary="id">
10715                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10716                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10717                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10718                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10719                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10720                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10721                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10722                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10723                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10724                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10725                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10726                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10727                 </fields>
10728                 <links>
10729                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10730                 </links>
10731         </class>
10732         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10733                 <fields oils_persist:primary="id">
10734                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10735                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10736                         <field reporter:label="Fingerprint" name="fingerprint" />
10737                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10738                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10739                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10740                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10741                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10742                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10743                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10744                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10745                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10746                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10747                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10748                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10749                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10750                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10751                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10752                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10753                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10754                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10755                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10756                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10757                 </fields>
10758                 <links>
10759                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10760                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10761                 </links>
10762         </class>
10763         <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">
10764                 <fields oils_persist:primary="id">
10765                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10766                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10767                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10768                 </fields>
10769                 <links>
10770                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10771                 </links>
10772         </class>
10773         <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">
10774                 <fields oils_persist:primary="id">
10775                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10776                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10777                 </fields>
10778                 <links>
10779                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10780                 </links>
10781         </class>
10782         <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">
10783                 <fields oils_persist:primary="id">
10784                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10785                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10786                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10787                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10788                 </fields>
10789                 <links>
10790                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10791                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10792                 </links>
10793         </class>
10794         <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">
10795                 <fields oils_persist:primary="xact">
10796                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10797                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
10798                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10799                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10800                 </fields>
10801                 <links>
10802                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10803                 </links>
10804         </class>
10805         <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">
10806                 <fields oils_persist:primary="xact">
10807                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10808                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
10809                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10810                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10811                 </fields>
10812                 <links>
10813                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10814                 </links>
10815         </class>
10816         <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)">
10817                 <fields oils_persist:primary="id">
10818                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10819                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10820                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10821                 </fields>
10822                 <links>
10823                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10824                 </links>
10825         </class>
10826         <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">
10827                 <fields oils_persist:primary="id">
10828                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10829                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10830                 </fields>
10831                 <links>
10832                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10833                 </links>
10834         </class>
10835         <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">
10836                 <fields oils_persist:primary="bibid">
10837                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10838                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10839                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10840                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10841                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10842                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10843                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10844                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10845                 </fields>
10846                 <links>
10847                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10848                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10849                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10850                 </links>
10851         </class>
10852         <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">
10853                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10854                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10855                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10856                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10857                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10858                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10859                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10860                 </fields>
10861                 <links>
10862                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10863                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10864                 </links>
10865                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10866                         <actions>
10867                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10868                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10869                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10870                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10871                         </actions>
10872                 </permacrud>
10873         </class>
10874         <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">
10875                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10876                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10877                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10878                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10879                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10880                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10881                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10882                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10883                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10884                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10885                 </fields>
10886                 <links>
10887                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10888                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10889                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10890                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10891                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10892                 </links>
10893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10894                         <actions>
10895                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10896                                         <context link="formula" field="owner"/>
10897                                 </create>
10898                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10899                                         <context link="formula" field="owner"/>
10900                                 </retrieve>
10901                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10902                                         <context link="formula" field="owner"/>
10903                                 </update>
10904                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10905                                         <context link="formula" field="owner"/>
10906                                 </delete>
10907                         </actions>
10908                 </permacrud>
10909         </class>
10910
10911         <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">
10912                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10913                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10914                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10915                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10916                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10917                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10918                 </fields>
10919                 <links>
10920                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10921                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10922                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10923                 </links>
10924                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10925                         <actions>
10926                                 <create permission="CREATE_PURCHASE_ORDER">
10927                                         <context link="formula" field="owner"/>
10928                 </create>
10929                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10930                                         <context link="formula" field="owner"/>
10931                 </retrieve>
10932                                 <update permission="CREATE_PURCHASE_ORDER">
10933                                         <context link="formula" field="owner"/>
10934                 </update>
10935                                 <delete permission="CREATE_PURCHASE_ORDER">
10936                                         <context link="formula" field="owner"/>
10937                 </delete>
10938                         </actions>
10939                 </permacrud>
10940         </class>
10941
10942         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10943                 <fields oils_persist:primary="id">
10944                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10945                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10946                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10947                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10948                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10949                 </fields>
10950                 <links>
10951                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10952                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10953                 </links>
10954         </class>
10955
10956         <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">
10957                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10958                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10959                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10960                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10961                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10962                 </fields>
10963                 <links>
10964                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10965                 </links>
10966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10967                         <actions>
10968                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10969                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10970                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10971                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10972                         </actions>
10973                 </permacrud>
10974         </class>
10975
10976         <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">
10977                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10978                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10979                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10980                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10981                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10982                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10983                 </fields>
10984                 <links>
10985                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10986                 </links>
10987                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10988                         <actions>
10989                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10990                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10991                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10992                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10993                         </actions>
10994                 </permacrud>
10995         </class>
10996
10997         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10998                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10999                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11000                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11001                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11002                 </fields>
11003                 <links>
11004                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11005                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11006                 </links>
11007         </class>
11008
11009         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
11010                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
11011                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11012                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11013                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11014                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11015                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11016                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11017                 </fields>
11018                 <links>
11019                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11020                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
11021                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11022                 </links>
11023         </class>
11024
11025         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
11026                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
11027                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11028                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11029                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
11030                 </fields>
11031                 <links>
11032                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11033                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
11034                 </links>
11035         </class>
11036
11037         <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">
11038                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
11039                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11040                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11041                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11042                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11043                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11044                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11045                 </fields>
11046                 <links>
11047                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11048                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
11049                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11050                 </links>
11051         </class>
11052
11053         <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">
11054                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
11055                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
11056                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
11057                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
11058                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11059                 </fields>
11060                 <links>
11061                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11062                 </links>
11063                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11064             <actions>
11065                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11066                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
11067                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11068                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11069             </actions>
11070                 </permacrud>
11071         </class>
11072
11073         <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">
11074                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
11075                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
11076                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
11077                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
11078                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
11079                 </fields>
11080                 <links>
11081                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
11082                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
11083                 </links>
11084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11085                         <actions>
11086                                 <create permission="ADMIN_CLAIM_POLICY">
11087                                         <context link="claim_policy" field="org_unit"/>
11088                 </create>
11089                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
11090                                         <context link="claim_policy" field="org_unit"/>
11091                 </retrieve>
11092                                 <update permission="ADMIN_CLAIM_POLICY">
11093                                         <context link="claim_policy" field="org_unit"/>
11094                 </update>
11095                                 <delete permission="ADMIN_CLAIM_POLICY">
11096                                         <context link="claim_policy" field="org_unit"/>
11097                 </delete>
11098                         </actions>
11099                 </permacrud>
11100         </class>
11101
11102     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
11103         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
11104             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11105             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
11106             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11107             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
11108             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
11109             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
11110             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
11111             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
11112             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
11113             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
11114             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
11115             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
11116             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
11117             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
11118             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11119             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
11120                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
11121                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
11122                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
11123         </fields>
11124         <links>
11125             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
11126             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11127         </links>
11128     </class>
11129
11130     <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">
11131         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
11132             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11133             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11134             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11135             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11136             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11137         </fields>
11138     </class>
11139
11140     <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">
11141         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11142             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11143             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11144             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11145             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11146             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11147             <field reporter:label="City" name="city" reporter:datatype="text"/>
11148             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11149             <field reporter:label="State" name="state" reporter:datatype="text"/>
11150             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11151             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11152             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11153         </fields>
11154     </class>
11155
11156     <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">
11157         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11158             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11159             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11160             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11161             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11162             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11163             <field reporter:label="City" name="city" reporter:datatype="text"/>
11164             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11165             <field reporter:label="State" name="state" reporter:datatype="text"/>
11166             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11167             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11168             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11169         </fields>
11170     </class>
11171
11172     <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">
11173         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
11174             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11175             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11176             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11177             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
11178             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
11179             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11180         </fields>
11181     </class>
11182
11183     <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">
11184         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
11185             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11186             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11187             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11188             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
11189             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
11190             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11191         </fields>
11192     </class>
11193
11194         <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">
11195                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
11196                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
11197                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11198                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
11199                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
11200                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
11201                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
11202                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
11203                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
11204                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11205                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11206                 </fields>
11207                 <links>
11208                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11209                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11210                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
11211                 </links>
11212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11213                         <actions>
11214                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11215                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11216                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11217                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11218                         </actions>
11219                 </permacrud>
11220         </class>
11221
11222         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
11223                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
11224                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
11225                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
11226                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
11227                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
11228                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
11229                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
11230                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
11231                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
11232                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
11233                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
11234                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
11235                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
11236                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
11237                 </fields>
11238                 <links>
11239                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
11240                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11241                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11242                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
11243                 </links>
11244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11245                         <actions>
11246                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11247                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11248                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11249                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11250                         </actions>
11251                 </permacrud>
11252         </class>
11253
11254         <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">
11255                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
11256                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
11257                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
11258                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
11259                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
11260                 </fields>
11261                 <links>
11262                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
11263                 </links>
11264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
11265                         <actions>
11266                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11267                     <context link="fieldset" field="owning_lib"/>
11268                 </create>
11269                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11270                     <context link="fieldset" field="owning_lib"/>
11271                 </retrieve>
11272                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11273                     <context link="fieldset" field="owning_lib"/>
11274                 </update>
11275                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11276                     <context link="fieldset" field="owning_lib"/>
11277                 </delete>
11278                         </actions>
11279                 </permacrud>
11280         </class>
11281
11282     <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">
11283         <fields>
11284             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11285             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11286             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11287         </fields>
11288                 <links>
11289                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11290                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11291                 </links>
11292     </class>
11293
11294     <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">
11295         <fields>
11296             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11297             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
11298         </fields>
11299                 <links>
11300                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11301                 </links>
11302     </class>
11303
11304     <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">
11305         <fields>
11306             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11307             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11308             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11309         </fields>
11310                 <links>
11311                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11312                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11313                 </links>
11314     </class>
11315
11316     <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">
11317         <fields>
11318             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11319             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
11320         </fields>
11321                 <links>
11322                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11323                 </links>
11324     </class>
11325
11326     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
11327                 <oils_persist:source_definition><![CDATA[
11328
11329             SELECT  DISTINCT l.*
11330               FROM  action.unfulfilled_hold_loops l
11331                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
11332               WHERE l.count = m.max
11333
11334                 ]]></oils_persist:source_definition>
11335         <fields>
11336             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11337             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11338             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11339         </fields>
11340                 <links>
11341                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11342                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11343                 </links>
11344     </class>
11345
11346         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
11347                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
11348                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
11349                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
11350                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
11351                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
11352                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
11353                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
11354                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
11355                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
11356                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
11357                 </fields>
11358                 <links>
11359                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
11360                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
11361                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
11362                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
11363                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
11364                 </links>
11365         </class>
11366
11367         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
11368                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
11369                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
11370                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
11371                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11372                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
11373                 </fields>
11374                 <links>
11375                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
11376                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
11377                 </links>
11378         </class>
11379
11380         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
11381                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11382                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11383                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11384                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11385                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11386                 </fields>
11387                 <links>
11388                 </links>
11389         </class>
11390
11391         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11392                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11393                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11394                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11395                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11396                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11397                 </fields>
11398                 <links>
11399                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11400                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11401                 </links>
11402         </class>
11403         
11404         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11405                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11406                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11407                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11408                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11409                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11410                 </fields>
11411                 <links>
11412                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11413                 </links>
11414         </class>
11415         
11416         <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">
11417                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11418                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11419                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11420                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11421                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11422                 </fields>
11423                 <links>
11424                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11425                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11426                 </links>
11427         </class>
11428
11429         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11430                 <fields oils_persist:primary="name">
11431                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11432                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11433                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11434                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11435                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11436                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11437                 </fields>
11438                 <links>
11439                 </links>
11440         </class>
11441
11442         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11443                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11444                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11445                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11446                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11447                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11448                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11449                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11450                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11451                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11452                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11453                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11454                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11455                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11456                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11457                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11458                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11459                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11460                 </fields>
11461                 <links>
11462                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11463                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11464                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11465                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11466                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11467                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11468                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11469                 </links>
11470         </class>
11471
11472         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11473                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11474                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11475                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11476                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11477                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11478                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11479                 </fields>
11480                 <links>
11481                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11482                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11483                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11484                 </links>
11485         </class>
11486
11487         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11488                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11489                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11490                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11491                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11492                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11493                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11494                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11495                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11496                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11497                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11498                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11499                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11500                 </fields>
11501                 <links>
11502                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11503                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11504                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11505                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11506                 </links>
11507         </class>
11508
11509         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11510                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11511                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11512                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11513                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11514                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11515                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11516                 </fields>
11517                 <links>
11518                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11519                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11520                 </links>
11521         </class>
11522
11523         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11524                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11525                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11526                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11527                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11528                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11529                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11530                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11531                 </fields>
11532                 <links>
11533                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11534                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11535                 </links>
11536         </class>
11537
11538         <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">
11539                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11540                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11541                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11542                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11543                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11544                 </fields>
11545                 <links>
11546                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11547                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11548                 </links>
11549         </class>
11550
11551         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11552                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11553                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11554                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11555                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11556                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11557                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11558                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11559                 </fields>
11560                 <links>
11561                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11562                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11563                 </links>
11564         </class>
11565
11566         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11567                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11568                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11569                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11570                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11571                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11572                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11573                 </fields>
11574                 <links>
11575                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11576                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11577                 </links>
11578         </class>
11579
11580         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11581                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11582                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11583                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11584                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11585                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11586                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11587                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11588                 </fields>
11589                 <links>
11590                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11591                 </links>
11592         </class>
11593
11594         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11595                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11596                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11597                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11598                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11599                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11600                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11601                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11602                 </fields>
11603                 <links>
11604                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11605                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11606                 </links>
11607         </class>
11608
11609         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11610                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11611                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11612                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11613                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11614                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11615                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11616                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11617                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11618                 </fields>
11619                 <links>
11620                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11621                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11622                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11623                 </links>
11624         </class>
11625
11626         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11627                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11628                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11629                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11630                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11631                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11632                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11633                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11634                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11635                 </fields>
11636                 <links>
11637                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11638                 </links>
11639         </class>
11640
11641         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11642                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11643                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11644                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11645                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11646                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11647                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11648                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11649                 </fields>
11650                 <links>
11651                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11652                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11653                 </links>
11654         </class>
11655
11656         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11657                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11658                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11659                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11660                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11661                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11662                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11663                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11664                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11665                 </fields>
11666                 <links>
11667                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11668                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11669                 </links>
11670         </class>
11671
11672         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11673                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11674                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11675                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11676                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11677                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11678                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11679                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11680                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11681                 </fields>
11682                 <links>
11683                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11684                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11685                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11686                 </links>
11687         </class>
11688
11689         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11690                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11691                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11692                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11693                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11694                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11695                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11696                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11697                 </fields>
11698                 <links>
11699                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11700                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11701                 </links>
11702         </class>
11703
11704         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11705                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11706                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11707                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11708                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11709                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11710                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11711                 </fields>
11712                 <links>
11713                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11714                 </links>
11715         </class>
11716
11717         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11718                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11719                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11720                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11721                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11722                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11723                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11724                 </fields>
11725                 <links>
11726                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11727                 </links>
11728         </class>
11729
11730         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11731                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11732                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11733                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11734                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11735                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11736                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11737                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11738                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11739                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11740                 </fields>
11741                 <links>
11742                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11743                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11744                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11745                 </links>
11746         </class>
11747
11748         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11749                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11750                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11751                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11752                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11753                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11754                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11755                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11756                 </fields>
11757                 <links>
11758                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11759                 </links>
11760         </class>
11761
11762         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11763                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11764                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11765                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11766                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11767                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11768                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11769                 </fields>
11770                 <links>
11771                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11772                 </links>
11773         </class>
11774
11775         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11776                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11777                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11778                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11779                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11780                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11781                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11782                 </fields>
11783                 <links>
11784                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11785                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11786                 </links>
11787         </class>
11788
11789         <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">
11790                 <fields oils_persist:primary="id">
11791                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11792                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11793                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11794                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11795                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11796                 </fields>
11797                 <links>
11798                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11799                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11800                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11801                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11802                 </links>
11803         </class>
11804
11805         <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">
11806                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11807                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11808                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11809                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11810                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11811                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11812                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11813                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11814                 </fields>
11815                 <links/>
11816                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11817                         <actions>
11818                                 <retrieve/>
11819                         </actions>
11820                 </permacrud>
11821         </class>
11822
11823         <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">
11824                 <fields oils_persist:primary="ptype_key">
11825                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11826                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11827                 </fields>
11828                 <links/>
11829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11830                         <actions>
11831                                 <retrieve/>
11832                         </actions>
11833                 </permacrud>
11834         </class>
11835
11836         <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">
11837                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11838                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11839                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11840                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11841                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11842                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11843                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11844                 </fields>
11845                 <links>
11846                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11847                 </links>
11848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11849                         <actions>
11850                                 <retrieve/>
11851                         </actions>
11852                 </permacrud>
11853         </class>
11854
11855         <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">
11856                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11857                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11858                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11859                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11860                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11861                 </fields>
11862                 <links>
11863                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11864                 </links>
11865                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11866                         <actions>
11867                                 <retrieve/>
11868                         </actions>
11869                 </permacrud>
11870         </class>
11871
11872     <class
11873         id="uvs"
11874         controller="open-ils.cstore open-ils.pcrud"
11875         oils_obj:fieldmapper="url_verify::session"
11876         oils_persist:tablename="url_verify.session"
11877         reporter:label="URL Verification Session"
11878     >
11879         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11880             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11881             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11882                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11883             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11884             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11885             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11886             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11887             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11888             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11889         </fields>
11890
11891         <links>
11892             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11893             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11894             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11895             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11896             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11897         </links>
11898
11899         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11900             <actions>
11901                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11902             </actions>
11903         </permacrud>
11904
11905     </class>
11906
11907     <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">
11908         <oils_persist:source_definition><![CDATA[
11909             SELECT
11910                 cbrebi.id AS id,  -- so we can have a pkey in our view
11911                 uvs.id AS session,
11912                 uvs.owning_lib,
11913                 cbrebi.target_biblio_record_entry
11914             FROM url_verify.session uvs
11915             JOIN container.biblio_record_entry_bucket cbreb
11916                 ON (uvs.container = cbreb.id)
11917             JOIN container.biblio_record_entry_bucket_item cbrebi
11918                 ON (cbrebi.bucket = cbreb.id)
11919         ]]></oils_persist:source_definition>
11920         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11921             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11922             <field reporter:label="Session" name="session" reporter:datatype="link" />
11923             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11924             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11925         </fields>
11926         <links>
11927             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11928             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11929             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11930         </links>
11931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11932             <actions>
11933                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11934             </actions>
11935         </permacrud>
11936     </class>
11937
11938     <class
11939         id="uvus"
11940         controller="open-ils.cstore open-ils.pcrud"
11941         oils_obj:fieldmapper="url_verify::url_selector"
11942         oils_persist:tablename="url_verify.url_selector"
11943         reporter:label="URL Verification URL Selector"
11944     >
11945         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11946             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11947             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11948                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11949             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11950         </fields>
11951
11952         <links>
11953             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11954             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11955         </links>
11956
11957         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11958             <actions>
11959                 <create permission="URL_VERIFY">
11960                     <context link="session" field="owning_lib"/>
11961                 </create>
11962                 <retrieve permission="URL_VERIFY">
11963                     <context link="session" field="owning_lib"/>
11964                 </retrieve>
11965                 <update permission="URL_VERIFY">
11966                     <context link="session" field="owning_lib"/>
11967                 </update>
11968                 <delete permission="URL_VERIFY">
11969                     <context link="session" field="owning_lib"/>
11970                 </delete>
11971             </actions>
11972         </permacrud>
11973
11974     </class>
11975
11976     <class
11977         id="uvu"
11978         controller="open-ils.cstore open-ils.pcrud"
11979         oils_obj:fieldmapper="url_verify::url"
11980         oils_persist:tablename="url_verify.url"
11981         reporter:label="URL Verification URL"
11982     >
11983         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11984             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11985                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11986                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11987                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11988                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11989             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11990             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11991             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11992             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11993             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11994             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11995             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11996             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11997             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11998             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11999             <field reporter:label="Query" name="query" reporter:datatype="text"/>
12000             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
12001             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
12002         </fields>
12003
12004         <links>
12005             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
12006             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
12007             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12008             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
12009             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
12010         </links>
12011
12012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12013             <actions>
12014                 <create permission="URL_VERIFY">
12015                     <context link="session" field="owning_lib"/>
12016                 </create>
12017                 <retrieve permission="URL_VERIFY">
12018                     <context link="session" field="owning_lib"/>
12019                 </retrieve>
12020                 <update permission="URL_VERIFY">
12021                     <context link="session" field="owning_lib"/>
12022                 </update>
12023                 <delete permission="URL_VERIFY">
12024                     <context link="session" field="owning_lib"/>
12025                 </delete>
12026             </actions>
12027         </permacrud>
12028
12029     </class>
12030
12031     <class
12032         id="uvva"
12033         controller="open-ils.cstore open-ils.pcrud"
12034         oils_obj:fieldmapper="url_verify::verification_attempt"
12035         oils_persist:tablename="url_verify.verification_attempt"
12036         reporter:label="URL Verification Attempt"
12037     >
12038         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
12039             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
12040                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
12041                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
12042             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
12043             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
12044         </fields>
12045
12046         <links>
12047             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12048             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12049         </links>
12050
12051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12052             <actions>
12053                 <create permission="URL_VERIFY">
12054                     <context link="session" field="owning_lib"/>
12055                 </create>
12056                 <retrieve permission="URL_VERIFY">
12057                     <context link="session" field="owning_lib"/>
12058                 </retrieve>
12059                 <update permission="URL_VERIFY">
12060                     <context link="session" field="owning_lib"/>
12061                 </update>
12062                 <delete permission="URL_VERIFY">
12063                     <context link="session" field="owning_lib"/>
12064                 </delete>
12065             </actions>
12066         </permacrud>
12067
12068     </class>
12069
12070     <class
12071         id="uvuv"
12072         controller="open-ils.cstore open-ils.pcrud"
12073         oils_obj:fieldmapper="url_verify::url_verification"
12074         oils_persist:tablename="url_verify.url_verification"
12075         reporter:label="URL Verification"
12076     >
12077         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
12078             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
12079                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
12080                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
12081             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
12082             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
12083             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
12084             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
12085                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
12086         </fields>
12087
12088         <links>
12089             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
12090             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
12091             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
12092         </links>
12093
12094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12095             <actions>
12096                 <create permission="URL_VERIFY">
12097                     <context link="attempt" jump="session" field="owning_lib"/>
12098                 </create>
12099                 <retrieve permission="URL_VERIFY">
12100                     <context link="attempt" jump="session" field="owning_lib"/>
12101                 </retrieve>
12102                 <update permission="URL_VERIFY">
12103                     <context link="attempt" jump="session" field="owning_lib"/>
12104                 </update>
12105                 <delete permission="URL_VERIFY">
12106                     <context link="attempt" jump="session" field="owning_lib"/>
12107                 </delete>
12108             </actions>
12109         </permacrud>
12110
12111     </class>
12112
12113         <class
12114                 id="cfdi"
12115                 controller="open-ils.cstore open-ils.pcrud"
12116                 oils_obj:fieldmapper="config::filter_dialog_interface"
12117                 oils_persist:tablename="config.filter_dialog_interface"
12118                 reporter:label="FilterDialog Interface">
12119                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
12120                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
12121                         <field reporter:label="Description" name="description" reporter:datatype="text" />
12122                 </fields>
12123                 <links>
12124                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
12125                 </links>
12126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12127                         <actions>
12128                                 <retrieve />
12129                         </actions>
12130                 </permacrud>
12131         </class>
12132
12133         <class
12134                 id="cfdfs"
12135                 controller="open-ils.cstore open-ils.pcrud"
12136                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
12137                 oils_persist:tablename="config.filter_dialog_filter_set"
12138                 reporter:label="FilterDialog Filter Set">
12139                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
12140                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12141                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12142                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12143                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12144                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
12145                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
12146                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
12147                 </fields>
12148                 <links>
12149                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12150                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12151                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
12152                 </links>
12153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12154                         <actions>
12155                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12156                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12157                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12158                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12159                         </actions>
12160                 </permacrud>
12161
12162         </class>
12163
12164         <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">
12165                 <fields oils_persist:primary="code">
12166                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
12167                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
12168                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
12169                 </fields>
12170                 <links/>
12171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12172                         <actions>
12173                                 <retrieve/>
12174                         </actions>
12175                 </permacrud>
12176         </class>
12177
12178         <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">
12179                 <oils_persist:source_definition><![CDATA[
12180
12181             SELECT  b.id,
12182                     MAX(dcp.edit_date) AS last_delete_date
12183              FROM   biblio.record_entry b
12184                     JOIN asset.call_number cn ON (cn.record = b.id)
12185                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
12186              WHERE  NOT b.deleted
12187              GROUP BY b.id
12188              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
12189
12190                 ]]></oils_persist:source_definition>
12191                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12192                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12193                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
12194                 </fields>
12195                 <links>
12196                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12197                 </links>
12198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12199                         <actions>
12200                                 <retrieve/>
12201                         </actions>
12202                 </permacrud>
12203         </class>
12204
12205         <class id="jubstlbl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::li_state_label" oils_persist:tablename="acq.li_state_label" oils_persist:readonly="true" reporter:label="Line Item State Labels" oils_persist:field_safe="true">
12206                 <fields oils_persist:primary="id">
12207                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12208                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12209                 </fields>
12210                 <links/>
12211                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12212                         <actions>
12213                                 <retrieve/>
12214                         </actions>
12215                 </permacrud>
12216         </class>
12217
12218         <class id="acqpostlbl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_state_label" oils_persist:tablename="acq.po_state_label" oils_persist:readonly="true" reporter:label="PO State Labels">
12219                 <fields oils_persist:primary="id">
12220                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12221                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12222                 </fields>
12223                 <links/>
12224                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12225                         <actions>
12226                                 <retrieve/>
12227                         </actions>
12228                 </permacrud>
12229         </class>
12230
12231
12232         <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">
12233                 <oils_persist:source_definition><![CDATA[
12234
12235             -- -- 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.
12236             -- -- 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
12237             -- -- may not.
12238             -- SELECT
12239             --     bre.id AS bib_id,
12240             --     COALESCE( z.copy_count, 0 ) AS copy_count,
12241             --     COALESCE( z.hold_count, 0 ) AS hold_count,
12242             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
12243             -- FROM (
12244                 SELECT
12245                     y.bre AS id,
12246                     COALESCE( x.copy_count, 0 ) AS copy_count,
12247                     y.hold_count AS hold_count,
12248                     (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
12249                 FROM (
12250                         SELECT
12251                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
12252                             COUNT(*) AS hold_count
12253                         FROM action.hold_request h
12254                         WHERE
12255                             cancel_time IS NULL
12256                             AND fulfillment_time IS NULL
12257                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
12258                         GROUP BY 1
12259                     )y LEFT JOIN (
12260                         SELECT 
12261                             (SELECT id
12262                                 FROM biblio.record_entry 
12263                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
12264                             ) AS bre, 
12265                             COUNT(*) AS copy_count
12266                         FROM asset.copy
12267                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
12268                         WHERE copy.holdable 
12269                             AND NOT copy.deleted 
12270                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
12271                         GROUP BY 1
12272                     )x ON x.bre = y.bre
12273                 -- )z RIGHT JOIN (
12274                 --     SELECT id
12275                 --     FROM biblio.record_entry
12276                 --     WHERE NOT deleted
12277                 -- )bre ON (z.bib_id = bre.id)
12278                 
12279
12280                 ]]></oils_persist:source_definition>
12281                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12282                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12283                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
12284                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
12285                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
12286                 </fields>
12287                 <links>
12288                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12289                 </links>
12290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12291                         <actions>
12292                                 <retrieve/>
12293                         </actions>
12294                 </permacrud>
12295         </class>
12296
12297         <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">
12298                 <oils_persist:source_definition><![CDATA[
12299             SELECT *,
12300                 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,
12301                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
12302             FROM
12303                 (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
12304                     FROM
12305                         action.hold_request ahr
12306                         JOIN reporter.hold_request_record rhrr USING (id)
12307                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12308                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
12309                     WHERE
12310                         ahr.cancel_time IS NULL
12311                         AND ahr.fulfillment_time IS NULL
12312                     GROUP BY bib_record, pickup_lib
12313                 )x
12314                 JOIN
12315                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12316                     FROM
12317                         action.hold_request ahr
12318                         JOIN reporter.hold_request_record rhrr USING (id)
12319                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12320                     WHERE
12321                         ahr.cancel_time IS NULL
12322                         AND ahr.fulfillment_time IS NULL
12323                     GROUP BY bib_record
12324                 )y
12325                 USING (id)
12326                 ]]></oils_persist:source_definition>
12327                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12328                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12329                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
12330                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
12331                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
12332                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12333                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12334                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
12335                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12336                 </fields>
12337                 <links>
12338                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12339                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
12340                 </links>
12341                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12342                         <actions>
12343                                 <retrieve/>
12344                         </actions>
12345                 </permacrud>
12346         </class>
12347
12348         <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) ">
12349                 <oils_persist:source_definition><![CDATA[
12350             WITH counts_at_ou AS (
12351                 SELECT  rhrr.bib_record AS id,
12352                         aou.id AS pickup_lib_or_desc,
12353                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
12354                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
12355                   FROM  actor.org_unit aou
12356                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
12357                         action.hold_request ahr
12358                         JOIN reporter.hold_request_record rhrr USING (id)
12359                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12360                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
12361                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
12362                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
12363                         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
12364                   GROUP BY 1, 2
12365             )
12366             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
12367                    y.holds_everywhere, y.copy_count_everywhere,
12368                 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,
12369                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
12370             FROM counts_at_ou x
12371                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12372                     FROM
12373                         action.hold_request ahr
12374                         JOIN reporter.hold_request_record rhrr USING (id)
12375                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12376                     WHERE
12377                         ahr.cancel_time IS NULL
12378                         AND ahr.fulfillment_time IS NULL
12379                     GROUP BY bib_record
12380                 )y
12381                 USING (id)
12382                 ]]></oils_persist:source_definition>
12383                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12384                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12385                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
12386                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
12387                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
12388                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12389                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12390                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
12391                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12392                 </fields>
12393                 <links>
12394                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12395                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
12396                 </links>
12397                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12398                         <actions>
12399                                 <retrieve/>
12400                         </actions>
12401                 </permacrud>
12402         </class>
12403
12404         <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">
12405                 <oils_persist:source_definition><![CDATA[
12406             SELECT
12407                 ac.id,
12408                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12409                 MAX(actac.xact_start) AS last_circ
12410             FROM asset.copy ac
12411                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12412             GROUP BY ac.id
12413
12414             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12415             --SELECT
12416             --    ac.id,
12417             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12418             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12419             --FROM asset.copy ac
12420             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12421             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12422             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12423                 ]]></oils_persist:source_definition>
12424                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12425                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12426                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12427                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12428                 </fields>
12429                 <links>
12430                         <link field="id" 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="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">
12440                 <fields oils_persist:primary="id">
12441                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12442                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12443                 </fields>
12444                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12445                         <actions>
12446                                 <retrieve/>
12447                         </actions>
12448                 </permacrud>
12449         </class>
12450
12451         <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">
12452                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12453                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12454                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12455                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12456                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12457                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12458                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12459                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12460                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12461                 </fields>
12462                 <links>
12463                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12464                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12465                 </links>
12466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12467                         <actions>
12468                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12469                                 <retrieve/>
12470                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12471                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12472                         </actions>
12473                 </permacrud>
12474         </class>
12475
12476         <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">
12477                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12478                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12479                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12480                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12481                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12482                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12483                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12484                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12485                 </fields>
12486                 <links>
12487                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12488                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12489                 </links>
12490                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12491                         <actions>
12492                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12493                                 <retrieve/>
12494                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12495                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12496                         </actions>
12497                 </permacrud>
12498         </class>
12499
12500
12501         <!-- ********************************************************************************************************************* -->
12502         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12503         <!-- ********************************************************************************************************************* -->
12504         <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">
12505                 <fields oils_persist:primary="id">
12506                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12507                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12508                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12509                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12510                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12511                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12512                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12513                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12514                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12515                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12516                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12517                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12518                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12519                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12520                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12521                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12522                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12523                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12524                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12525                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12526                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12527                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12528                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12529                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12530                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12531                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12532                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12533                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12534                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12535                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12536                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12537                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12538                 </fields>
12539                 <links>
12540                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12541                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12542                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12543                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12544                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12545                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12546                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12547                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12548                 </links>
12549         </class>
12550
12551         <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">
12552                 <fields oils_persist:primary="id">
12553                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12554                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12555                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12556                 </fields>
12557                 <links>
12558                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12559                 </links>
12560         </class>
12561
12562         <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">
12563                 <fields oils_persist:primary="id">
12564                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12565                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12566                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12567                 </fields>
12568                 <links>
12569                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12570                 </links>
12571         </class>
12572
12573         <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">
12574                 <fields oils_persist:primary="id">
12575                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12576
12577                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12578                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12579                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12580
12581                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12582                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12583                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12584
12585                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12586                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12587
12588                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12589                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12590                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12591
12592                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12593                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12594
12595                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12596                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12597                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12598
12599                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12600                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12601                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12602
12603                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12604                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12605                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12606                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12607
12608                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12609                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12610
12611                 </fields>
12612                 <links>
12613                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12614                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12615                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12616                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12617                 </links>
12618         </class>
12619
12620         <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">
12621                 <oils_persist:source_definition><![CDATA[
12622
12623             SELECT
12624                 po.ordering_agency AS ordering_agency,
12625                 po.id AS purchase_order,
12626                 li.id AS lineitem,
12627                 lid.id AS lineitem_detail,
12628                 cpa.id AS claim_policy_action
12629             FROM
12630                 acq.lineitem_detail lid
12631                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12632                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12633                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12634                 JOIN acq.claim_policy_action cpa ON (
12635                     cpa.claim_policy = cp.id
12636
12637                     -- we only care about claim policy actions whose claim
12638                     -- interval we'd reached or exceeded
12639                     AND (NOW() - cpa.action_interval) > po.order_date
12640
12641                     -- filter out all claim policy actions where claim events
12642                     -- have occurred on or after the action's action_interval
12643                     AND NOT EXISTS (
12644                         SELECT 1
12645                         FROM
12646                             acq.claim_event evt
12647                             JOIN acq.claim claim ON (
12648                                 claim.id = evt.claim
12649                                 AND claim.lineitem_detail = lid.id
12650                             )
12651                         WHERE
12652                             evt.event_date >= (po.order_date + cpa.action_interval)
12653                     )
12654                 )
12655             WHERE
12656                 lid.cancel_reason IS NULL
12657                 AND li.cancel_reason IS NULL -- belt/suspenders
12658                 AND po.cancel_reason IS NULL -- belt/suspenders
12659                 AND lid.recv_time IS NULL
12660                 AND po.state = 'on-order'
12661             ORDER BY 1, 2, 3, 4, 5
12662
12663                 ]]></oils_persist:source_definition>
12664                 <fields>
12665                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12666                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12667                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12668                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12669                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12670                 </fields>
12671                 <links>
12672                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12673                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12674                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12675                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12676                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12677                 </links>
12678         </class>
12679         <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">
12680                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12681                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12682                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12683                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12684                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12685                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12686                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12687                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12688                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12689                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12690                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12691                 </fields>
12692                 <links>
12693                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12694                 </links>
12695     </class>
12696         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12697                 <oils_persist:source_definition><![CDATA[
12698             SELECT * FROM acq.lineitem_summary 
12699                                 WHERE item_count > (invoice_count + cancel_count)
12700         ]]></oils_persist:source_definition>
12701                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12702                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12703                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12704                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12705                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12706                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12707                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12708                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12709                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12710                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12711                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12712                 </fields>
12713                 <links>
12714                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12715                 </links>
12716     </class>
12717         <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">
12718                 <oils_persist:source_definition><![CDATA[
12719
12720                         SELECT  t.*
12721                           FROM  action.transit_copy t
12722                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12723                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12724                           WHERE s.parent_ou <> d.parent_ou
12725
12726                 ]]></oils_persist:source_definition>
12727                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12728                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12729                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12730                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12731                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12732                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12733                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12734                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12735                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12736                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12737                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12738                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12739                 </fields>
12740                 <links>
12741                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12742                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12743                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12744                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12745                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12746                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12747                 </links>
12748         </class>
12749
12750     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12751                 <oils_persist:source_definition><![CDATA[
12752
12753         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12754                 SELECT
12755                         cp.id as copy,
12756                         COUNT(circ.id),
12757                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12758                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12759                 FROM
12760                         asset.copy cp
12761                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12762                 GROUP BY 1, 3, 4
12763                 UNION ALL
12764                 SELECT
12765                         cp.id as copy,
12766                         COUNT(circ.id),
12767                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12768                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12769                 FROM
12770                         asset.copy cp
12771                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12772                 GROUP BY 1, 3, 4
12773                 UNION ALL
12774                 SELECT
12775                         id as copy,
12776                         circ_count,
12777                         -1 AS year,
12778                         false as is_renewal
12779                 FROM
12780                         extend_reporter.legacy_circ_count
12781         )x GROUP BY 1, 3, 4
12782
12783                 ]]></oils_persist:source_definition>
12784         <fields>
12785             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12786             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12787             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12788             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12789         </fields>
12790                 <links>
12791                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12792                 </links>
12793                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12794                         <actions>
12795                                 <retrieve/>
12796                         </actions>
12797                 </permacrud>
12798     </class>
12799
12800         <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">
12801                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12802                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12803                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12804                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12805                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12806                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12807                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12808                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12809                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12810                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12811                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12812                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12813                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12814                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12815                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12816                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12817                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12818                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12819                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12820                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12821                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12822                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12823                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12824                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12825                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12826                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12827                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12828                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12829                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12830                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12831                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12832                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
12833                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
12834                 </fields>
12835                 <links>
12836                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12837                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12838                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12839                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12840                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12841                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12842                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12843                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12844                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12845                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12846                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12847                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12848                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12849                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12850                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12851                 </links>
12852         </class>
12853
12854     <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">
12855         <fields oils_persist:primary="id">
12856             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12857             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12858             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12859             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12860             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12861             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12862             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12863             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12864             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12865             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12866             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12867             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12868             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12869             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12870             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12871             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12872             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12873             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12874             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12875             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12876             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12877             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12878             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12879             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12880             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12881             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12882             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12883             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12884             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12885             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12886             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12887             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12888             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12889             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12890         </fields>
12891         <links>
12892             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12893             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12894             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12895             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12896             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12897             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12898             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12899             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12900         </links>
12901     </class>
12902
12903     <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">
12904         <fields oils_persist:primary="id">
12905             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12906             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12907             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12908             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12909         </fields>
12910         <links>
12911             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12912             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12913         </links>
12914     </class>
12915
12916     <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">
12917         <fields oils_persist:primary="owning_lib">
12918             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12919             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12920             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12921         </fields>
12922         <links>
12923             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12924         </links>
12925     </class>
12926
12927     <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">
12928         <fields oils_persist:primary="id">
12929             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12930             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12931             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12932             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12933             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12934         </fields>
12935         <links>
12936             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12937             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12938             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12939         </links>
12940     </class>
12941
12942     <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">
12943         <fields oils_persist:primary="circ_lib">
12944             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12945             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12946             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12947             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12948         </fields>
12949         <links>
12950             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12951             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12952         </links>
12953     </class>
12954
12955     <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">
12956         <fields oils_persist:primary="id">
12957             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12958             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12959             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12960             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12961             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12962         </fields>
12963         <links>
12964             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12965             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12966             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12967         </links>
12968     </class>
12969
12970     <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">
12971         <fields oils_persist:primary="home_ou">
12972             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12973             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12974             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12975             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12976         </fields>
12977         <links>
12978             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12979             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12980         </links>
12981     </class>
12982         <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">
12983                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12984                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12985                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12986                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12987                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12988                 </fields>
12989                 <links>
12990                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12991                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12992                 </links>
12993                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12994                         <actions>
12995                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12996                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12997                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12998                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12999                         </actions>
13000                 </permacrud>
13001         </class>
13002         <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">
13003                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
13004                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
13005                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
13006                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
13007                 </fields>
13008                 <links>
13009                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
13010                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
13011                         </links>
13012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13013                 <actions>
13014                                 <create permission="ADMIN_ACQ_FUND_TAG">
13015                                         <context link="tag" field="owner"/>
13016                                 </create>
13017                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
13018                                         <context link="tag" field="owner"/>
13019                                 </retrieve>
13020                                 <update permission="ADMIN_ACQ_FUND_TAG">
13021                                         <context link="tag" field="owner"/>
13022                                 </update>
13023                                 <delete permission="ADMIN_ACQ_FUND_TAG">
13024                                         <context link="tag" field="owner"/>
13025                                 </delete>
13026                         </actions>
13027                 </permacrud>
13028         </class>
13029         <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">
13030                 <oils_persist:source_definition><![CDATA[
13031                 SELECT
13032                         poi.purchase_order AS purchase_order,
13033                         ii.invoice AS invoice,
13034                         NULL AS lineitem,
13035                         poi.id AS po_item,
13036                         NULL AS picklist
13037                 FROM
13038                         acq.po_item poi
13039                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
13040                 UNION SELECT
13041                         jub.purchase_order AS purchase_order,
13042                         ie.invoice AS invoice,
13043                         jub.id AS lineitem,
13044                         NULL AS po_item,
13045                         jub.picklist AS picklist
13046                 FROM
13047                         acq.lineitem jub
13048                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
13049                 UNION SELECT
13050                         ii.purchase_order AS purchase_order,
13051                         ii.invoice AS invoice,
13052                         NULL AS lineitem,
13053                         NULL AS po_item,
13054                         NULL AS picklist
13055                 FROM
13056                         acq.invoice_item ii
13057                 WHERE ii.po_item IS NULL
13058                 UNION SELECT
13059                         ie.purchase_order AS purchase_order,
13060                         ie.invoice AS invoice,
13061                         NULL AS lineitem,
13062                         NULL AS po_item,
13063                         NULL AS picklist
13064                 FROM
13065                         acq.invoice_entry ie
13066                 WHERE ie.lineitem IS NULL
13067                 UNION SELECT
13068                         NULL AS purchase_order,
13069                         NULL AS invoice,
13070                         jub.id AS lineitem,
13071                         NULL AS po_item,
13072                         jub.picklist AS picklist
13073                 FROM
13074                         acq.lineitem jub
13075                 WHERE jub.purchase_order IS NULL
13076                 ]]></oils_persist:source_definition>
13077                 <fields>
13078                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
13079                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
13080                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
13081                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
13082                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
13083                 </fields>
13084                 <links>
13085                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
13086                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
13087                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
13088                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
13089                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
13090                 </links>
13091         </class>
13092         <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">
13093                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
13094                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13095                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13096                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
13097                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
13098                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
13099                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
13100                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
13101                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
13102                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
13103                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
13104                 </fields>
13105                 <links>
13106                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13107                 </links>
13108                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13109                         <actions>
13110                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13111                                 <retrieve/>
13112                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13113                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13114                         </actions>
13115                 </permacrud>
13116         </class>
13117
13118         <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">
13119                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
13120                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13121                         <field name="date_applied" reporter:datatype="timestamp"/>
13122                         <field name="org" reporter:datatype="org_unit"/>
13123                         <field name="original_value" reporter:datatype="text"/>
13124                         <field name="new_value" reporter:datatype="text"/>
13125                         <field name="field_name" reporter:datatype="link"/>
13126                 </fields>
13127                 <links>
13128                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
13129                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
13130                 </links>
13131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13132                         <actions>
13133                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
13134                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
13135                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
13136                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
13137                         </actions>
13138                 </permacrud>
13139         </class>
13140         <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">
13141                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13142                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13143                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13144                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13145                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13146                 </fields>
13147                 <links>
13148                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13149                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
13150                 </links>
13151         </class>
13152         <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">
13153                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13154                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13155                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13156                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13157                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13158                 </fields>
13159                 <links>
13160                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13161                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
13162                 </links>
13163         </class>
13164         <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">
13165                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
13166                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
13167                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13168                         <field reporter:label="Manual" name="manual" reporter:datatype="bool" oils_obj:required="true"/>
13169                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
13170                 </fields>
13171                 <links>
13172                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
13173                 </links>
13174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13175                         <actions>
13176                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13177                                 <retrieve/>
13178                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13179                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13180                         </actions>
13181                 </permacrud>
13182         </class>
13183         <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">
13184                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
13185                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13186                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link" oils_obj:required="true"/>
13187                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" oils_obj:required="true"/>
13188                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int" oils_obj:required="true"/>
13189                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
13190                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool" oils_obj:required="true"/>
13191                 </fields>
13192                 <links>
13193                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
13194                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
13195                 </links>
13196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13197                         <actions>
13198                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13199                                 <retrieve/>
13200                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13201                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13202                         </actions>
13203                 </permacrud>
13204         </class>
13205         <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">
13206                 <fields oils_persist:primary="code">
13207                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
13208                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
13209                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13210                 </fields>
13211                 <links>
13212                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13213                 </links>
13214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13215                         <actions>
13216                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13217                                 <retrieve/>
13218                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13219                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13220                         </actions>
13221                 </permacrud>
13222         </class>
13223         <class id="acpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag" oils_persist:tablename="asset.copy_tag" reporter:label="Item Tags" oils_persist:field_safe="true">
13224                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
13225                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13226                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
13227                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
13228                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13229                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
13230                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
13231                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13232                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
13233                 </fields>
13234                 <links>
13235                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
13236                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13237                 </links>
13238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13239                         <actions>
13240                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
13241                                 <retrieve/>
13242                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
13243                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
13244                         </actions>
13245                 </permacrud>
13246         </class>
13247         <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">
13248                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
13249                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13250                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
13251                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
13252                 </fields>
13253                 <links>
13254                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
13255                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
13256                 </links>
13257                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13258                         <actions>
13259                                 <create permission="UPDATE_COPY">
13260                     <context link="copy" field="circ_lib"/>
13261                 </create>
13262                                 <retrieve/>
13263                                 <update permission="UPDATE_COPY">
13264                     <context link="copy" field="circ_lib"/>
13265                 </update>
13266                                 <delete permission="UPDATE_COPY">
13267                     <context link="copy" field="circ_lib"/>
13268                 </delete>
13269                         </actions>
13270                 </permacrud>
13271         </class>
13272         <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">
13273         <oils_persist:source_definition><![CDATA[
13274         SELECT ahcm.target_copy AS id,count(*) AS count
13275          FROM
13276          action.hold_request ahr,
13277          action.hold_copy_map ahcm
13278          WHERE
13279          ahr.cancel_time IS NULL AND
13280          ahr.fulfillment_time IS NULL AND
13281          ahr.capture_time IS NULL AND
13282          ahr.id = ahcm.hold
13283          GROUP BY ahcm.target_copy
13284         ]]></oils_persist:source_definition>
13285         <fields oils_persist:primary="id">
13286             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
13287             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
13288         </fields>
13289         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13290             <actions>
13291                <retrieve/>
13292             </actions>
13293         </permacrud>
13294         </class>
13295
13296         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
13297                 oils_obj:fieldmapper="config::workstation_setting_type" 
13298                 oils_persist:tablename="config.workstation_setting_type" 
13299                 reporter:label="Workstation Setting Type">
13300                 <fields oils_persist:primary="name">
13301                         <field name="name" reporter:datatype="text"/>
13302                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
13303                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
13304                         <field name="datatype" reporter:datatype="text"/>
13305                         <field name="fm_class" reporter:datatype="text"/>
13306                         <field name="grp" reporter:datatype="link"/>
13307                 </fields>
13308                 <links>
13309                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
13310                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
13311                 </links>
13312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13313                         <actions>
13314                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13315                                 <retrieve/>
13316                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13317                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13318                         </actions>
13319                 </permacrud>
13320         </class>
13321
13322         <!-- no pcrud access is granted for now, because it's assumed these
13323                          setting values will be applied and retrived via the API. -->
13324         <class id="awss" 
13325                 controller="open-ils.cstore"
13326                 oils_obj:fieldmapper="actor::workstation_setting" 
13327                 oils_persist:tablename="actor.workstation_setting" 
13328                 reporter:label="Workstation Setting">
13329                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
13330                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
13331                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
13332                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13333                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
13334                 </fields>
13335                 <links>
13336                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
13337                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
13338                 </links>
13339         </class>
13340
13341         <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">
13342         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
13343                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
13344                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
13345                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
13346         </fields>
13347         </class>
13348
13349         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
13350                 oils_obj:fieldmapper="config::print_template" 
13351                 oils_persist:tablename="config.print_template" 
13352                 reporter:label="Print Templates">
13353                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
13354                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
13355                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
13356                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
13357                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
13358                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13359                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
13360                         <field name="content_type" reporter:datatype="text"/>
13361                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
13362                 </fields>
13363                 <links>
13364                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13365                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
13366                 </links>
13367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13368                         <actions>
13369                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13370                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
13371                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13372                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13373                         </actions>
13374                 </permacrud>
13375         </class>
13376
13377         <class id="cct" 
13378                 controller="open-ils.cstore open-ils.pcrud"
13379                 oils_obj:fieldmapper="config::carousel_type" 
13380                 oils_persist:tablename="config.carousel_type" 
13381                 reporter:label="Carousel Types">
13382                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
13383                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
13384                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13385                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
13386                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
13387                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
13388                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
13389                 </fields>
13390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13391                         <actions>
13392                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13393                                 <retrieve/>
13394                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13395                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13396                         </actions>
13397                 </permacrud>
13398         </class>
13399
13400         <class id="cc" 
13401                 controller="open-ils.cstore open-ils.pcrud"
13402                 oils_obj:fieldmapper="container::carousel" 
13403                 oils_persist:tablename="container.carousel" 
13404                 reporter:label="Carousels">
13405                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
13406                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13407                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
13408                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13409                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13410                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13411                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13412                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13413                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13414                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13415                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13416                         <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 -->
13417                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13418                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13419                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13420                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13421                 </fields>
13422                 <links>
13423                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13424                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13425                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13426                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13427                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13428                 </links>
13429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13430                         <actions>
13431                                 <create permission="ADMIN_CAROUSEL" context_field="owner"/>
13432                                 <retrieve permission="ADMIN_CAROUSEL" context_field="owner"/>
13433                                 <update permission="ADMIN_CAROUSEL" context_field="owner"/>
13434                                 <delete permission="ADMIN_CAROUSEL" context_field="owner"/>
13435                         </actions>
13436                 </permacrud>
13437         </class>
13438
13439         <class id="ccou" 
13440                 controller="open-ils.cstore open-ils.pcrud"
13441                 oils_obj:fieldmapper="container::carousel_org_unit" 
13442                 oils_persist:tablename="container.carousel_org_unit" 
13443                 reporter:label="Carousels Visible at Library">
13444                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13445                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13446                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13447                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13448                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13449                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13450                 </fields>
13451                 <links>
13452                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13453                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13454                 </links>
13455                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13456                         <actions>
13457                                 <create permission="ADMIN_CAROUSEL">
13458                                     <context link="carousel" field="owner" />
13459                                 </create>
13460                                 <retrieve permission="ADMIN_CAROUSEL">
13461                                     <context link="carousel" field="owner" />
13462                                 </retrieve>
13463                                 <update permission="ADMIN_CAROUSEL">
13464                                     <context link="carousel" field="owner" />
13465                                 </update>
13466                                 <delete permission="ADMIN_CAROUSEL">
13467                                     <context link="carousel" field="owner" />
13468                                 </delete>
13469                         </actions>
13470                 </permacrud>
13471         </class>
13472
13473         <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">
13474                 <fields oils_persist:primary="name">
13475                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13476                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13477                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13478                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13479                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13480                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13481                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13482                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13483                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13484                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13485                 </fields>
13486                 <links>
13487                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13488                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13489                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13490                 </links>
13491                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13492                         <actions>
13493                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13494                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13495                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13496                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13497                         </actions>
13498                 </permacrud>
13499         </class>
13500
13501         <!-- ********************************************************************************************************************* -->
13502 </IDL>
13503
13504 <!--
13505     vim:noet:ts=4:sw=4:
13506 -->