]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
f2abaa798f27bca60928c9873343b147eaff2863
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <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">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <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">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <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">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <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">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <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"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <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">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <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">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <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">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <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">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <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">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <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">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <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">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <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">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <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">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <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">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <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">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <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">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <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">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <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">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <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">
808                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
809                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
810                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
811                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
812                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
813                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
814                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
815                 </fields>
816                 <links>
817                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
818                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
819                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
820                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
821                 </links>
822         </class>
823
824     <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">
825         <fields oils_persist:primary="name">
826             <field reporter:label="Name" name="name" reporter:datatype="text"/>
827             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
828             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
829             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
830         </fields>
831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
832             <actions>
833                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
834                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
835                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
836                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
837             </actions>
838         </permacrud>
839     </class>
840
841     <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">
842         <fields oils_persist:primary="id">
843             <field reporter:label="ID" name="id" reporter:datatype="id"/>
844             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
845             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
846             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
847             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
848         </fields>
849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
850             <actions>
851                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
852                 <retrieve/>
853                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
854                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
855             </actions>
856         </permacrud>
857     </class>
858
859         <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">
860                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
861                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
862                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
863                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
864                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
865                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
866                 </fields>
867                 <links>
868                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
869                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
870                 </links>
871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
872             <actions>
873                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
874                 <retrieve/>
875                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
876                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
877             </actions>
878         </permacrud>
879         </class>
880
881         <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">
882                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
883                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
884                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
885                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
886         </fields>
887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
888             <actions>
889                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
890                 <retrieve/>
891                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
892                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
893             </actions>
894         </permacrud>
895         </class>
896
897         <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">
898                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
899                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
900                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
901                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
902                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
903                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
904                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
905                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
906                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
907                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
908                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
909                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
910         </fields>
911                 <links>
912                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
913                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
914         </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
918                 <retrieve/>
919                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
920                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <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">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
928                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
929                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
930                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
931                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
933                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
934                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
935                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
936                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
937         </fields>
938                 <links>
939                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
940                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
941         </links>
942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
943             <actions>
944                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
945                 <retrieve/>
946                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
947                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
948             </actions>
949         </permacrud>
950         </class>
951
952         <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">
953                 <fields oils_persist:primary="name">
954                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
955                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
956                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
957                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
958                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
959                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
960                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
961                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
962                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
963                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
964                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
965                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
966                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
967                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
968                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
969                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
970                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
971                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
972                 </fields>
973                 <links>
974                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
975                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
976                 </links>
977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
978             <actions>
979                 <create permission="ADMIN_SVF" global_required="true"/>
980                 <retrieve/>
981                 <update permission="ADMIN_SVF" global_required="true"/>
982                 <delete permission="ADMIN_SVF" global_required="true"/>
983             </actions>
984         </permacrud>
985         </class>
986
987         <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">
988                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
990                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
991                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
992             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
993                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
994                 </fields>
995                 <links/>
996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
997             <actions>
998                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
999                 <retrieve/>
1000                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1001                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1002             </actions>
1003         </permacrud>
1004         </class>
1005
1006         <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">
1007                 <fields oils_persist:primary="coded_value">
1008                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1009                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1010                 </fields>
1011                 <links>
1012                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1013                 </links>
1014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1015             <actions>
1016                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1017                 <retrieve/>
1018                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1019                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1020             </actions>
1021         </permacrud>
1022         </class>
1023
1024         <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">
1025                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1026                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1027                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1028                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1029                 </fields>
1030                 <links>
1031                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1032                 </links>
1033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1034             <actions>
1035                 <retrieve/>
1036             </actions>
1037         </permacrud>
1038         </class>
1039
1040
1041         <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">
1042                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1043                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1044                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1045                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1046                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1047                 </fields>
1048                 <links>
1049                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1050                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1051                 </links>
1052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1053             <actions>
1054                 <retrieve/>
1055             </actions>
1056         </permacrud>
1057         </class>
1058
1059
1060         <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">
1061                 <fields oils_persist:primary="source">
1062                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1063                         <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 -->
1064                 </fields>
1065                 <links>
1066                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1067                 </links>
1068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1069             <actions>
1070                 <retrieve/>
1071             </actions>
1072         </permacrud>
1073         </class>
1074
1075         <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">
1076                 <fields>
1077                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1078                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1079                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1080                 </fields>
1081                 <links>
1082                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1083                 </links>
1084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085             <actions>
1086                 <retrieve/>
1087             </actions>
1088         </permacrud>
1089         </class>
1090
1091         <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">
1092                 <fields oils_persist:primary="id">
1093                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1094                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1095                 </fields>
1096                 <links>
1097                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
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         <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">
1107                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1108                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1109                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1110                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1111                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1112                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1113                 </fields>
1114                 <links>
1115                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1116                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1117                 </links>
1118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1119             <actions>
1120                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1121                 <retrieve/>
1122                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1123                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1124             </actions>
1125         </permacrud>
1126         </class>
1127
1128         <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">
1129                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1130                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1131                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1132                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1133                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1134                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1135                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1136                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1137             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1138             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1139             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1140                 </fields>
1141                 <links>
1142                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1143                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1144                 </links>
1145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1146             <actions>
1147                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1148                 <retrieve/>
1149                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1150                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1151             </actions>
1152         </permacrud>
1153         </class>
1154
1155         <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">
1156                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1157                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1158                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1159                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1160                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1161                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1162                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1163                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1164                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1165                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1166                 </fields>
1167                 <links>
1168                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1169                 </links>
1170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1171             <actions>
1172                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1173                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1174                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1175                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1176             </actions>
1177         </permacrud>
1178         </class>
1179
1180     <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">
1181         <fields oils_persist:primary="name">
1182             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1183             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1185             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1186             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1187             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1188             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1189             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1190             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1191             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1192         </fields>
1193         <links>
1194             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1195             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1196         </links>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1200                 <retrieve/>
1201                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1202                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1203             </actions>
1204         </permacrud>
1205     </class>
1206
1207     <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">
1208         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1209             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1210             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1211             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1212             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1213             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1214             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1215             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1216         </fields>
1217         <links>
1218             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1219         </links>
1220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1221             <actions>
1222                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1223                 <retrieve/>
1224                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1225                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1226             </actions>
1227         </permacrud>
1228     </class>
1229
1230     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1231                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1232                         oils_persist:tablename="config.z3950_index_field_map" 
1233                         reporter:label="Z39.50 Index Field Map">
1234         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1235             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1236             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1237             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1238             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1239             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1240             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1241         </fields>
1242         <links>
1243             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1244             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1245             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1246         </links>
1247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1248             <actions>
1249                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250                 <retrieve/>
1251                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1252                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1253             </actions>
1254         </permacrud>
1255     </class>
1256
1257
1258         <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">
1259                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1260                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1261                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1262                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1263                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1264                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1265                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1266                 </fields>
1267                 <links>
1268             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1269             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1270                 </links>
1271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1272                         <actions>
1273                                 <retrieve/>
1274                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1275                         </actions>
1276                 </permacrud>
1277         </class>
1278
1279         <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">
1280                 <fields oils_persist:primary="key">
1281                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1282                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1283                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1284                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1285                 </fields>
1286                 <links/>
1287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1288                         <actions>
1289                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1290                                 <retrieve/>
1291                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1292                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1293                         </actions>
1294                 </permacrud>
1295         </class>
1296
1297         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1298                 <fields oils_persist:primary="module">
1299                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1301                 </fields>
1302                 <links/>
1303         </class>
1304
1305         <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">
1306                 <fields oils_persist:primary="module">
1307                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1308                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1309                 </fields>
1310                 <links/>
1311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1312                         <actions>
1313                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1314                                 <retrieve/>
1315                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1316                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1317                         </actions>
1318                 </permacrud>
1319         </class>
1320
1321         <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">
1322                 <fields oils_persist:primary="module">
1323                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1324                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1325                 </fields>
1326                 <links/>
1327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1328                         <actions>
1329                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1330                                 <retrieve/>
1331                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1332                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1333                         </actions>
1334                 </permacrud>
1335         </class>
1336
1337         <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">
1338                 <fields oils_persist:primary="module">
1339                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1340                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1341                 </fields>
1342                 <links/>
1343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1344                         <actions>
1345                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1346                                 <retrieve/>
1347                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1348                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1349                         </actions>
1350                 </permacrud>
1351         </class>
1352
1353         <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">
1354                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1355                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1356                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1357                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1358                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1359                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1360                 </fields>
1361                 <links>
1362                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1363                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1364                 </links>
1365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1366                         <actions>
1367                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1368                     <context link="event_def" field="owner"/>
1369                 </create>
1370                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1371                     <context link="event_def" field="owner"/>
1372                 </retrieve>
1373                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1374                     <context link="event_def" field="owner"/>
1375                 </update>
1376                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1377                     <context link="event_def" field="owner"/>
1378                 </delete>
1379                         </actions>
1380                 </permacrud>
1381         </class>
1382
1383         <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">
1384                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1385                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1386                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1387                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1388                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1389                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1390                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1391                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1392                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1393                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1394                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1395                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1396                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1397                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1398                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1399                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1400                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1401                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1402                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1403                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1404                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1405                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1406                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1407                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1408                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1409                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1410                 </fields>
1411                 <links>
1412                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1413                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1414                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1415                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1416                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1417                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1418                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1419                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1420                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1421                 </links>
1422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1423                         <actions>
1424                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1425                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1426                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1427                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1428                         </actions>
1429                 </permacrud>
1430         </class>
1431
1432         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1433                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1434                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1435                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1436                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1437                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1438                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1439                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1440                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1441                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1442                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1443                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1444                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1445                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1446                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1447                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1448                 </fields>
1449                 <links>
1450                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1451                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1452                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1453                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1454                 </links>
1455         </class>
1456
1457         <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">
1458                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1459                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1460                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1461                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1462                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1463                 </fields>
1464                 <links>
1465                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1466                 </links>
1467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1468                         <actions>
1469                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1470                     <context link="event_def" field="owner"/>
1471                 </create>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1473                     <context link="event_def" field="owner"/>
1474                 </retrieve>
1475                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1476                     <context link="event_def" field="owner"/>
1477                 </update>
1478                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1479                     <context link="event_def" field="owner"/>
1480                 </delete>
1481                         </actions>
1482                 </permacrud>
1483         </class>
1484
1485         <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">
1486                 <oils_persist:source_definition><![CDATA[
1487                 SELECT  atevdef.hook,
1488                         atevdef.name,
1489                         atevdef.reactor,
1490                         atev.id,
1491                         atev.event_def,
1492                         atev.add_time,
1493                         atev.run_time,
1494                         atev.start_time,
1495                         atev.update_time,
1496                         atev.complete_time,
1497                         atev.update_process,
1498                         atev.state,
1499                         atev.user_data,
1500                         atev.template_output,
1501                         atev.error_output,
1502                         atev.async_output,
1503                         targ_circ.id AS target_circ,
1504                         targ_ahr.id AS target_hold,
1505                         COALESCE(
1506                                 targ_circ.circ_lib,
1507                                 targ_ahr.pickup_lib
1508                         ) AS perm_lib
1509                 FROM action_trigger.event atev
1510                 JOIN action_trigger.event_definition atevdef ON
1511                         (atevdef.id = atev.event_def)
1512                 JOIN action_trigger.hook ath ON
1513                         (ath.key = atevdef.hook)
1514                 LEFT JOIN action.circulation targ_circ ON
1515                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1516                 LEFT JOIN action.hold_request targ_ahr ON
1517                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1518                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1519                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1520                                 'circ.staff.max_visible_event_age',
1521                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1522                         ) UNION
1523                         SELECT '1000 YEARS'::INTERVAL AS value
1524                 ) ous)
1525                 ]]></oils_persist:source_definition>
1526                 <fields oils_persist:primary="id">
1527                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1528                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1529                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1530                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1531                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1532                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1533                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1534                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1535                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1536                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1537                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1538                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1539                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1540                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1541                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1542                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1543                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1544                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1545                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1546                 </fields>
1547                 <links>
1548                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1549                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1550                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1551                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1552                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1553                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1554                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1555                 </links>
1556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557                         <actions>
1558                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1559                         </actions>
1560                 </permacrud>
1561         </class>
1562
1563         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1564                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1565                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1566                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1567                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1568                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1569                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1570                 </fields>
1571                 <links>
1572                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1573                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1574                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1575                 </links>
1576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1577                         <actions>
1578                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1579                         </actions>
1580                 </permacrud>
1581         </class>
1582
1583         <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">
1584                 <fields oils_persist:primary="code">
1585                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1586                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1587                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1588                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1589                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1590                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1591                 </fields>
1592                 <links/>
1593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1594             <actions>
1595                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1596                 <retrieve/>
1597                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1598                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1599             </actions>
1600         </permacrud>
1601         </class>
1602
1603         <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">
1604                 <fields oils_persist:primary="code">
1605                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1606                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1607                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1608                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1609                 </fields>
1610                 <links/>
1611         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1612             <actions>
1613                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1614                 <retrieve/>
1615                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1616                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1617             </actions>
1618         </permacrud>
1619         </class>
1620
1621         <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">
1622                 <fields oils_persist:primary="code">
1623                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1624                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1625                 </fields>
1626                 <links/>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1630                 <retrieve/>
1631                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1632                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1633             </actions>
1634         </permacrud>
1635         </class>
1636
1637         <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">
1638                 <fields oils_persist:primary="code">
1639                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1640                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1641                 </fields>
1642                 <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1648                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651         </class>
1652
1653         <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">
1654                 <fields oils_persist:primary="code">
1655                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1656                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1657                 </fields>
1658                 <links/>
1659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660             <actions>
1661                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1662                 <retrieve/>
1663                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1664                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1665             </actions>
1666         </permacrud>
1667         </class>
1668
1669         <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">
1670                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1671                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1672                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1673                 </fields>
1674                 <links/>
1675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1676             <actions>
1677                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1678                 <retrieve/>
1679                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1680                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1681             </actions>
1682         </permacrud>
1683         </class>
1684
1685         <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">
1686                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1687                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1688                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1689                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1690                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1691                 </fields>
1692         <links>
1693             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1694             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1695             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1696         </links>
1697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1698             <actions>
1699                 <create permission="UPDATE_COPY">
1700                     <context link="target_copy" field="circ_lib"/>
1701                 </create>
1702                 <retrieve/>
1703                 <update permission="UPDATE_COPY">
1704                     <context link="target_copy" field="circ_lib"/>
1705                 </update>
1706                 <delete permission="UPDATE_COPY">
1707                     <context link="target_copy" field="circ_lib"/>
1708                 </delete>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <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">
1714                 <fields oils_persist:primary="code">
1715                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <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">
1730                 <fields oils_persist:primary="code">
1731                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1733                 </fields>
1734                 <links/>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1740                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1741             </actions>
1742         </permacrud>
1743         </class>
1744
1745         <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">
1746                 <fields oils_persist:primary="code">
1747                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1748                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1749                 </fields>
1750                 <links/>
1751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1752             <actions>
1753                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1754                 <retrieve/>
1755                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1756                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1757             </actions>
1758         </permacrud>
1759         </class>
1760
1761     <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">
1762         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1763             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1764             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1765             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1766             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1767             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1768             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1769             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1770             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1771             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1772             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1773             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1774             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1775             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1776             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1777             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1778             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1779             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1780         </fields>
1781         <links/>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1787                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790     </class>
1791
1792     <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">
1793         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1794             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1795             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1796             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1797             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1798             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1799             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1800             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1801             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1802             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1803             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1804             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1805             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1806             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1807             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1808             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1809             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1810             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1811             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1812             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1813         </fields>
1814         <links/>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1818                 <retrieve/>
1819                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1820                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1821             </actions>
1822         </permacrud>
1823     </class>
1824
1825     <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">
1826         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1827             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1828             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1829             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1830             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1831             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1832         </fields>
1833         <links>
1834             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1835             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1836             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1837         </links>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1841                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1842                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1843                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1844             </actions>
1845         </permacrud>
1846     </class>
1847
1848         <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">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1850                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1851                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1852                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1853                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1854                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1855                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1856                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1857                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1858                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1859                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1860                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1861                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1862                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1863                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1864                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1865                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1866             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1867                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1868                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1869                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1870                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1871                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1872                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1873                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1874                 </fields>
1875                 <links>
1876                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1877                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1878                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1879                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1880                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1881                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1882                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1883                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1884                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1885                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1886                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1887                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1888                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1889             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1890                 </links>
1891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1892             <actions>
1893                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1894                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1895                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1896                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1897             </actions>
1898         </permacrud>
1899         </class>
1900
1901         <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">
1902                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1903                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1904                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1905                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1906                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1907                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1908                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1909                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1910                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1911                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1912                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1913                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1914                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1915                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1916                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1917                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1918             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1919                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1920                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1921             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1922                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1923                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1924                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1925                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1926             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1927             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1928             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1929                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1930                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1931                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1932                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1933                 </fields>
1934                 <links>
1935                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1936                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1937                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1938                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1939                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1940                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1941                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1942                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1943                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1944                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1945                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1946                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1947                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1948                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1949             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1950                 </links>
1951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1952             <actions>
1953                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1954                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1955                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1956                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1957             </actions>
1958         </permacrud>
1959         </class>
1960
1961     <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">
1962         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1963             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1964             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1965             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1966         </fields>
1967         <links/>
1968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1969             <actions>
1970                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1971                 <retrieve/>
1972                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1973                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1974             </actions>
1975         </permacrud>
1976     </class>
1977
1978     <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">
1979         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1980             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1981             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1982             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1983             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1984             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1985             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1986             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1987         </fields>
1988         <links>
1989             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1990         </links>
1991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1992             <actions>
1993                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1994                 <retrieve/>
1995                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1996                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1997             </actions>
1998         </permacrud>
1999     </class>
2000
2001     <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">
2002         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2003             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2004             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2005             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2006             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2007             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2008         </fields>
2009         <links>
2010             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2011             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2012         </links>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2016                     <context link="matchpoint" field="org_unit"/>
2017                 </create>
2018                 <retrieve/>
2019                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2020                     <context link="matchpoint" field="org_unit"/>
2021                 </update>
2022                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2023                     <context link="matchpoint" field="org_unit"/>
2024                 </delete>
2025             </actions>
2026         </permacrud>
2027     </class>
2028
2029     <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">
2030         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2031             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2032             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2033             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2034         </fields>
2035         <links>
2036             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2037             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2038         </links>
2039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2040             <actions>
2041                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2042                     <context link="limit_set" field="owning_lib"/>
2043                 </create>
2044                 <retrieve/>
2045                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2046                     <context link="limit_set" field="owning_lib"/>
2047                 </update>
2048                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2049                     <context link="limit_set" field="owning_lib"/>
2050                 </delete>
2051             </actions>
2052         </permacrud>
2053     </class>
2054     <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">
2055         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2056             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2057             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2058             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2059         </fields>
2060         <links>
2061             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2062             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2063         </links>
2064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2065             <actions>
2066                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="limit_set" field="owning_lib"/>
2068                 </create>
2069                 <retrieve/>
2070                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2071                     <context link="limit_set" field="owning_lib"/>
2072                 </update>
2073                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2074                     <context link="limit_set" field="owning_lib"/>
2075                 </delete>
2076             </actions>
2077         </permacrud>
2078     </class>
2079
2080     <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">
2081         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2082             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2083             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2084             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2085             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2086         </fields>
2087         <links>
2088             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2089             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2090         </links>
2091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2092             <actions>
2093                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2094                     <context link="limit_set" field="owning_lib"/>
2095                 </create>
2096                 <retrieve/>
2097                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2098                     <context link="limit_set" field="owning_lib"/>
2099                 </update>
2100                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2101                     <context link="limit_set" field="owning_lib"/>
2102                 </delete>
2103             </actions>
2104         </permacrud>
2105     </class>
2106
2107         <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">
2108                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2109                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2110                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2111                 </fields>
2112                 <links/>
2113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2114             <actions>
2115                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2116                 <retrieve/>
2117                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2118                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2119             </actions>
2120         </permacrud>
2121         </class>
2122
2123         <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">
2124                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2125                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2126                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2127                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2128                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2129                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2130                 </fields>
2131                 <links>
2132                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2133                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2134                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2135                 </links>
2136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137             <actions>
2138                 <create permission="ADMIN_SURVEY">
2139                     <context link="survey" field="owner"/>
2140                 </create>
2141                 <retrieve/>
2142                 <update permission="ADMIN_SURVEY">
2143                     <context link="survey" field="owner"/>
2144                 </update>
2145                 <delete permission="ADMIN_SURVEY">
2146                     <context link="survey" field="owner"/>
2147                 </delete>
2148             </actions>
2149         </permacrud>
2150         </class>
2151         <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">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="">
2153                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2154                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2155                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2156                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2157                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2158                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2159                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2160                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2161                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2162                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2163                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2164                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2165                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2166                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2167                 </fields>
2168                 <links>
2169                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2170                 </links>
2171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2172                         <actions>
2173                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2174                                         <context link="usr" field="home_ou" />
2175                                 </retrieve>
2176                         </actions>
2177                 </permacrud>
2178         </class>
2179         <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">
2180                 <fields oils_persist:primary="id" oils_persist:sequence="">
2181                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2182                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2183                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2184                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2185                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2186                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2187                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2188                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2189                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2190                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2191                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2192                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2193                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2194                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2195                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2196                 </fields>
2197                 <links>
2198                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2199                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2200                 </links>
2201         </class>
2202         <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">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2204                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2205                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2206                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2207                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2208                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2209                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2210                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2211                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2212                 </fields>
2213                 <links>
2214                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2215                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2216                 </links>
2217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2218                         <actions> <!-- created magically, so no create action -->
2219                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2220                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2221                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2222                         </actions>
2223                 </permacrud>
2224         </class>
2225         <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)">
2226                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2227                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2228                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2230                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2231                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2232                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2233                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2234                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2235                 </fields>
2236                 <links>
2237                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2238                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2239                 </links>
2240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2241                         <actions> <!-- created magically, so no create action -->
2242                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2243                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2244                         </actions>
2245                 </permacrud>
2246         </class>
2247         <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">
2248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2249                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2251                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2253                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2260                 </links>
2261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262             <actions>
2263                 <create permission="UPDATE_USER" context_field="owner">
2264                     <context link="usr" field="home_ou"/>
2265                 </create>
2266                                 <!-- note: public notes are still accessible via API -->
2267                 <retrieve permission="UPDATE_USER">
2268                     <context link="usr" field="home_ou"/>
2269                                 </retrieve>
2270                 <update permission="UPDATE_USER">
2271                     <context link="usr" field="home_ou"/>
2272                                 </update>
2273                 <delete permission="UPDATE_USER">
2274                     <context link="usr" field="home_ou"/>
2275                                 </delete>
2276             </actions>
2277         </permacrud>
2278         </class>
2279         <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">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2281                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2282                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2283                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2284                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2285                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2286                 </fields>
2287                 <links>
2288                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2289                 </links>
2290         </class>
2291         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2293                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2294                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2295                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2296                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2297                 </fields>
2298                 <links>
2299                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2300                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2301                 </links>
2302         </class>
2303         <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">
2304                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2305                         <field name="field" reporter:datatype="link"/>
2306                         <field name="id" reporter:datatype="id" />
2307                         <field name="source" reporter:datatype="link"/>
2308                         <field name="value" reporter:datatype="text"/>
2309                 </fields>
2310                 <links>
2311                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2312                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2313                 </links>
2314         </class>
2315         <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">
2316                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2317                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2318                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2319                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2320                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2321                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2322                 </fields>
2323                 <links>
2324                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2325                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2326                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2327                 </links>
2328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2329                         <actions>
2330                                 <retrieve/>
2331                         </actions>
2332                 </permacrud>
2333         </class>
2334         <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">
2335                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2336                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2337                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2338                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2339                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2340                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2341                 </fields>
2342                 <links>
2343                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2344                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2345                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2346                 </links>
2347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2348                         <actions>
2349                                 <retrieve/>
2350                         </actions>
2351                 </permacrud>
2352         </class>
2353         <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">
2354                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2355                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2356                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2357                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2358                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2359                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2360                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2361                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2362                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2363                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2364                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2365                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2366                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2367                 </fields>
2368                 <links>
2369                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2370                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2371                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2372                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2373                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2374                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2375                 </links>
2376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2377             <actions>
2378                 <create permission="TRANSIT_COPY" context_field="owner">
2379                     <context link="target_copy" field="circ_lib"/>
2380                 </create>
2381                 <retrieve/>
2382                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2383                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2384             </actions>
2385         </permacrud>
2386         </class>
2387         <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">
2388                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2389                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2390                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2391                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2392                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2393                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2394                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2395                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2396                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2397                 </fields>
2398                 <links>
2399                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2400                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2401                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2402                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2403                 </links>
2404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405             <actions>
2406                 <create permission="ADMIN_SURVEY">
2407                     <context link="survey" field="owner"/>
2408                 </create>
2409                 <retrieve permission="VIEW_USER">
2410                     <context link="usr" field="home_ou"/>
2411                 </retrieve>
2412                 <update permission="ADMIN_SURVEY">
2413                     <context link="survey" field="owner"/>
2414                 </update>
2415                 <delete permission="ADMIN_SURVEY">
2416                     <context link="survey" field="owner"/>
2417                 </delete>
2418             </actions>
2419         </permacrud>
2420         </class>
2421         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2422                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2423                         <field name="bucket" />
2424                         <field name="id" reporter:datatype="id" />
2425                         <field name="target_copy" reporter:datatype="link"/>
2426                         <field name="create_time" reporter:datatype="timestamp" />
2427                         <field name="pos" reporter:datatype="int" />
2428                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2429                 </fields>
2430                 <links>
2431                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2432                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2433             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2434                 </links>
2435         </class>
2436         <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">
2437                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2438                         <field name="id" reporter:datatype="id" />
2439                         <field name="item" reporter:datatype="link"/>
2440                         <field name="note" reporter:datatype="text" />
2441                 </fields>
2442                 <links>
2443                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2444                 </links>
2445         </class>
2446
2447         <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">
2448                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2449                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2450                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2451                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2452                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2453                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2454                 </fields>
2455                 <links>
2456                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2457                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2458                 </links>
2459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2460                         <actions>
2461                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2462                                 <retrieve/>
2463                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2464                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2465                         </actions>
2466                 </permacrud>
2467         </class>
2468
2469         <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">
2470                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2471                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2472                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2473                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2474                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2475                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2476                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2477                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2478                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2479                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2480                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2481                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2482                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2483                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2484                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2485                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2486                 </fields>
2487                 <links>
2488                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2489                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2490                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2491                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2492                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2493                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2494                 </links>
2495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2496                         <actions>
2497                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2498                                 <retrieve/>
2499                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2500                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2501                         </actions>
2502                 </permacrud>
2503         </class>
2504
2505         <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">
2506                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2507                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2508                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2509                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2510                 </fields>
2511                 <links>
2512                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2513                 </links>
2514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2515                         <actions>
2516                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2517                                 <retrieve/>
2518                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2519                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2520                         </actions>
2521                 </permacrud>
2522         </class>
2523
2524         <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">
2525                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2526                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2527                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2528                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2529                 </fields>
2530                 <links>
2531                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2532                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2533                 </links>
2534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2535                         <actions>
2536                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2537                                 <retrieve/>
2538                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2539                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2540                         </actions>
2541                 </permacrud>
2542         </class>
2543
2544         <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">
2545                 <fields oils_persist:primary="code">
2546                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2547                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2548                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2549                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2550                 </fields>
2551                 <links>
2552                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2553                 </links>
2554                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2555                         <actions>
2556                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2557                                 <retrieve/>
2558                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2559                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2560                         </actions>
2561                 </permacrud>
2562         </class>
2563
2564         <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">
2565                 <fields oils_persist:primary="code">
2566                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2567                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2568                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2569                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2570                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2571                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2572                 </fields>
2573                 <links>
2574                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2575                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2576                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2577                 </links>
2578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2579                         <actions>
2580                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2581                                 <retrieve/>
2582                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2583                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2584                         </actions>
2585                 </permacrud>
2586         </class>
2587
2588     <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">
2589         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2590             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2591             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2592             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2593         </fields>
2594         <links>
2595             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2596             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2597         </links>
2598         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2599             <actions>
2600                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2601                 <retrieve/>
2602                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2603                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2604             </actions>
2605         </permacrud>
2606     </class>
2607
2608         <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">
2609                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2610                         <field name="active" reporter:datatype="bool"/>
2611                         <field name="create_date" reporter:datatype="timestamp"/>
2612                         <field name="creator" />
2613                         <field name="deleted" reporter:datatype="bool"/>
2614                         <field name="edit_date" reporter:datatype="timestamp"/>
2615                         <field name="editor" />
2616                         <field name="id" reporter:datatype="id" />
2617                         <field name="last_xact_id" />
2618                         <field name="marc" />
2619                         <field name="source" />
2620                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2621                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2622                         <field name="heading" />
2623                         <field name="simple_heading" />
2624                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2625                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2626                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2627                 </fields>
2628                 <links>
2629                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2630                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2631                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2632                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2633                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2634                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2635                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2636                 </links>
2637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2638                         <actions>
2639                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2640                                 <retrieve/>
2641                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2642                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2643                         </actions>
2644                 </permacrud>
2645         </class>
2646         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2647                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2648                         <field name="char_encoding" />
2649                         <field name="id" />
2650                         <field name="record" />
2651                         <field name="record_status" />
2652                         <field name="thesaurus" />
2653                 </fields>
2654                 <links>
2655                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2656                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2657                 </links>
2658         </class>
2659         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2660                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2661                         <field name="id" reporter:datatype="id" />
2662                         <field name="bib" reporter:datatype="link" />
2663                         <field name="authority" reporter:datatype="link" />
2664                 </fields>
2665                 <links>
2666                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2667                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2668                 </links>
2669         </class>
2670         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2671                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2672                         <field name="id" reporter:datatype="id" />
2673                         <field name="record" reporter:datatype="link" />
2674                         <field name="atag" reporter:datatype="link" />
2675                         <field name="value" reporter:datatype="text" />
2676                 </fields>
2677                 <links>
2678                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2679                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2680                 </links>
2681         </class>
2682         <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">
2683                 <fields oils_persist:primary="code" oils_persist:sequence="">
2684                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2685                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2686                 </fields>
2687                 <links/>
2688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2689             <actions>
2690                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2691                 <retrieve/>
2692                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2693                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2694             </actions>
2695         </permacrud>
2696         </class>
2697         <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">
2698                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2699                         <field name="accepting_usr" />
2700                         <field name="amount" reporter:datatype="money" />
2701                         <field name="amount_collected" reporter:datatype="money" />
2702                         <field name="approval_code" reporter:datatype="text"/>
2703                         <field name="cash_drawer" reporter:datatype="link"/>
2704                         <field name="cc_number" reporter:datatype="text"/>
2705                         <field name="cc_order_number" reporter:datatype="text"/>
2706                         <field name="cc_processor" reporter:datatype="text"/>
2707                         <field name="id" reporter:datatype="id" />
2708                         <field name="note" reporter:datatype="text"/>
2709                         <field name="payment_ts" reporter:datatype="timestamp"/>
2710                         <field name="xact" reporter:datatype="link"/>
2711                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2712                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2713                 </fields>
2714                 <links>
2715                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2716                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2717                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2718                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2719                 </links>
2720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2721             <actions>
2722                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2723                     <context link="xact" jump="usr" field="home_ou"/>
2724                 </retrieve>
2725                         </actions>
2726                 </permacrud>
2727         </class>
2728         <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">
2729                 <fields oils_persist:primary="name">
2730                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2731                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2732                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2733                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2734                 </fields>
2735                 <links/>
2736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2737             <actions>
2738                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2739                 <retrieve/>
2740                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2741                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2742             </actions>
2743         </permacrud>
2744         </class>
2745
2746         <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">
2747                 <fields oils_persist:primary="alias">
2748                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2749                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2750                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2751                 </fields>
2752                 <links>
2753                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2754                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2755                 </links>
2756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2757             <actions>
2758                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2759                 <retrieve/>
2760                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2761                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2762             </actions>
2763         </permacrud>
2764         </class>
2765
2766         <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">
2767                 <fields oils_persist:primary="name">
2768                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2769                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2770                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2771                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2772                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2773                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2774                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2775                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2776                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2777                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2778                 </fields>
2779                 <links>
2780                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2781                 </links>
2782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2783             <actions>
2784                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2785                 <retrieve/>
2786                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2787                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2788             </actions>
2789         </permacrud>
2790         </class>
2791
2792         <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">
2793                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2794                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2795                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2796                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2797                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2798                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2799                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2800                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2801                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2802                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2803                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2804                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2805                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2806                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2807                 </fields>
2808                 <links>
2809                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2810                 </links>
2811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2812             <actions>
2813                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2814                 <retrieve/>
2815                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2816                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2817             </actions>
2818         </permacrud>
2819         </class>
2820         <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">
2821                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2822                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2823                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2824                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2825                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2826                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2827                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2828                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2829                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2830                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2831                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2832                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2833                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2834                 </fields>
2835                 <links>
2836                 </links>
2837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2838                         <actions>
2839                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2840                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2841                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2842                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2843                         </actions>
2844                 </permacrud>
2845         </class>
2846         <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">
2847                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2848                         <field name="id" reporter:datatype="id" />
2849                         <field name="name" reporter:datatype="text"/>
2850                         <field name="xpath" reporter:datatype="text"/>
2851                         <field name="format" reporter:datatype="link"/>
2852                         <field name="first_word" reporter:datatype="bool" />
2853                 </fields>
2854                 <links/>
2855         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2856             <actions>
2857                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2858                 <retrieve/>
2859                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2860                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2861             </actions>
2862         </permacrud>
2863         </class>
2864         <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">
2865                 <fields oils_persist:primary="code" oils_persist:sequence="">
2866                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2867                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2868                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2869                 </fields>
2870                 <links/>
2871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2872             <actions>
2873                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2874                 <retrieve/>
2875                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2876                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2877             </actions>
2878         </permacrud>
2879         </class>
2880         <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">
2881                 <fields oils_persist:primary="code" oils_persist:sequence="">
2882                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2883                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2884                 </fields>
2885                 <links/>
2886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2887             <actions>
2888                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2889                 <retrieve/>
2890                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2891                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2892             </actions>
2893         </permacrud>
2894         </class>
2895     <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">
2896         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2897             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2898             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2899             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2900             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2901         </fields>
2902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2903             <actions>
2904                 <retrieve/>
2905             </actions>
2906         </permacrud>
2907     </class>
2908         <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">
2909                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2910                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2911                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2912                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2913                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2914                 </fields>
2915                 <links>
2916                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2917                 </links>
2918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2919             <actions>
2920                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2921                 <retrieve/>
2922                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2923                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2924             </actions>
2925         </permacrud>
2926         </class>
2927         <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">
2928                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2929                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2930                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2931                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2932                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2933                 </fields>
2934                 <links>
2935                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2936                 </links>
2937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2938             <actions>
2939                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2940                 <retrieve/>
2941                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2942                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2943             </actions>
2944         </permacrud>
2945         </class>
2946         <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">
2947                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2948                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2949                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2950                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2951                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2952                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2953                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2954                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2955                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2956                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2957                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2958                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2959                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2960                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2961                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2962                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2963                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2964                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2965                 </fields>
2966                 <links>
2967                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2968                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2969                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2970                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2971                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2972                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2973                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2974                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2975                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2976                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2977                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2978                 </links>
2979         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2980             <actions>
2981                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2982                 <retrieve/>
2983                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2984                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2985             </actions>
2986         </permacrud>
2987         </class>
2988         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2989                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2990                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2991                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2992                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2993                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2994                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2995                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2996                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2997                 </fields>
2998                 <links>
2999                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3000                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3001         </links>
3002         </class>
3003         <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">
3004                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3005                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3006                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3007                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3008                 </fields>
3009                 <links>
3010                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3011                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3012                 </links>
3013         </class>
3014         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3015                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3016                         <field name="id" reporter:datatype="id" />
3017                         <field name="value" oils_persist:i18n="true" />
3018                 </fields>
3019                 <links/>
3020         </class>
3021         <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">
3022                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3023                         <field name="balance_owed" reporter:datatype="money" />
3024                         <field name="total_owed" reporter:datatype="money" />
3025                         <field name="total_paid" reporter:datatype="money" />
3026                         <field name="usr" reporter:datatype="link"/>
3027                 </fields>
3028                 <links>
3029                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3030         </links>
3031         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3032             <actions>
3033                 <retrieve permission="VIEW_USER">
3034                     <context link="usr" field="home_ou"/>
3035                 </retrieve>
3036             </actions>
3037         </permacrud>
3038         </class>
3039         <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">
3040                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3041                         <field name="collector" />
3042                         <field name="enter_time" reporter:datatype="timestamp"/>
3043                         <field name="id" reporter:datatype="id" />
3044                         <field name="location" reporter:datatype="link"/>
3045                         <field name="usr" reporter:datatype="link"/>
3046                 </fields>
3047                 <links>
3048                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3049                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3050                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3051                 </links>
3052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3053             <actions>
3054                 <create permission="money.collections_tracker.create" context_field="location"/>
3055                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3056                 <delete permission="money.collections_tracker.create" context_field="location"/>
3057             </actions>
3058         </permacrud>
3059         </class>
3060         <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">
3061                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3062                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3063                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3064                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3065                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3066                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3067                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3068                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3069                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3070                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3071                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3072                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3073                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3074                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3075                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3076                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3077                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3078                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3079                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3080                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3081                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3082                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3083                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3084                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3085                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3086                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3087                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3088                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3089                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3090                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3091                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3092                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3093                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3094                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3095                 </fields>
3096                 <links>
3097                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3098                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3099                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3100                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3101                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3102                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3103                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3104                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3105                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3106                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3107                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3108                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3109                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3110                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3111                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3112                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3113                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3114                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3115                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3116                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3117                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3118                 </links>
3119         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3120             <actions>
3121                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3122                 <retrieve/>
3123                 <update permission="UPDATE_MARC" global_required="true"/>
3124                 <!-- 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. -->
3125                 <delete permission="DELETE_RECORD" global_required="true"/>
3126             </actions>
3127         </permacrud>
3128         </class>
3129         <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">
3130                 <fields oils_persist:primary="id">
3131                         <field name="dow_0_close" />
3132                         <field name="dow_0_open" />
3133                         <field name="dow_1_close" />
3134                         <field name="dow_1_open" />
3135                         <field name="dow_2_close" />
3136                         <field name="dow_2_open" />
3137                         <field name="dow_3_close" />
3138                         <field name="dow_3_open" />
3139                         <field name="dow_4_close" />
3140                         <field name="dow_4_open" />
3141                         <field name="dow_5_close" />
3142                         <field name="dow_5_open" />
3143                         <field name="dow_6_close" />
3144                         <field name="dow_6_open" />
3145                         <field name="id" reporter:datatype="id" />
3146                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3147                 </fields>
3148                 <links>
3149                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3150                 </links>
3151         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3152             <actions>
3153                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3154                 <retrieve/>
3155                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3156                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3157             </actions>
3158         </permacrud>
3159         </class>
3160         <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">
3161                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3162                         <field name="id" reporter:datatype="id" />
3163                         <field name="record" reporter:datatype="link"/>
3164                         <field name="label" reporter:datatype="text"/>
3165                         <field name="label_sortkey" reporter:datatype="text"/>
3166                         <field name="deleted" reporter:datatype="bool"/>
3167                 </fields>
3168                 <links>
3169                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3170                 </links>
3171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3172             <actions>
3173                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3174                 <retrieve/>
3175                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3176                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3177             </actions>
3178         </permacrud>
3179         </class>
3180         <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">
3181                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3182                         <field name="id" reporter:datatype="id" />
3183                         <field name="target_copy" reporter:datatype="link" />
3184                         <field name="part" reporter:datatype="link"/>
3185                 </fields>
3186                 <links>
3187                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3188                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3189                 </links>
3190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3191             <actions>
3192                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3193                 <retrieve/>
3194                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3195                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3196             </actions>
3197         </permacrud>
3198         </class>
3199         <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">
3200                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3201                         <field name="close_end" reporter:datatype="timestamp" />
3202                         <field name="close_start" reporter:datatype="timestamp" />
3203                         <field name="id" reporter:datatype="id" />
3204                         <field name="org_unit" reporter:datatype="org_unit"/>
3205                         <field name="reason" reporter:datatype="text"/>
3206                         <field name="full_day" reporter:datatype="bool"/>
3207                         <field name="multi_day" reporter:datatype="bool"/>
3208                 </fields>
3209                 <links>
3210                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3211                 </links>
3212         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3213             <actions>
3214                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3215                 <retrieve/>
3216                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3217                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3218             </actions>
3219         </permacrud>
3220         </class>
3221         <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">
3222                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3223                         <field name="extended" reporter:datatype="interval"/>
3224                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3225                         <field name="max_renewals" reporter:datatype="int" />
3226                         <field name="name" reporter:datatype="text"/>
3227                         <field name="normal" reporter:datatype="interval"/>
3228                         <field name="shrt" reporter:datatype="interval"/>
3229                 </fields>
3230                 <links>
3231                 </links>
3232         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3233             <actions>
3234                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3235                 <retrieve/>
3236                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3237                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3238             </actions>
3239         </permacrud>
3240         </class>
3241
3242         <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">
3243                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3244                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3245                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3246             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3247                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3248             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3249                 </fields>
3250                 <links>
3251             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3252                 </links>
3253                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3254             <actions>
3255                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3256                 <retrieve/>
3257                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3258                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3259             </actions>
3260                 </permacrud>
3261         </class>
3262
3263         <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">
3264                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3265                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3266                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3267                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3268             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3269                 </fields>
3270                 <links>
3271                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3272                 </links>
3273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3274             <actions>
3275                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3276                 <retrieve/>
3277                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3278                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3279             </actions>
3280                 </permacrud>
3281         </class>
3282
3283         <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">
3284                 <fields oils_persist:primary="id" oils_persist:sequence="">
3285                         <field name="balance_owed" reporter:datatype="money"/>
3286                         <field name="id" reporter:datatype="id" />
3287                         <field name="last_billing_note" reporter:datatype="text"/>
3288                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3289                         <field name="last_billing_type" reporter:datatype="text"/>
3290                         <field name="last_payment_note" reporter:datatype="text"/>
3291                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3292                         <field name="last_payment_type" reporter:datatype="text"/>
3293                         <field name="total_owed" reporter:datatype="money"/>
3294                         <field name="total_paid" reporter:datatype="money"/>
3295                         <field name="usr" reporter:datatype="link"/>
3296                         <field name="xact_finish" reporter:datatype="timestamp" />
3297                         <field name="xact_start" reporter:datatype="timestamp" />
3298                         <field name="xact_type" reporter:datatype="text"/>
3299                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3300                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3301                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3302                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3303                         <field name="billing_location" reporter:datatype="link"/>
3304                 </fields>
3305                 <links>
3306                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3307                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3308                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3309                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3310                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3311                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3312                 </links>
3313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3314                         <actions>
3315                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3316                                         <context link="usr" field="home_ou" />
3317                                 </retrieve>
3318                         </actions>
3319                 </permacrud>
3320         </class>
3321         <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">
3322                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3323                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3324                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3325                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3326                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3327                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3328                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3329                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3330                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3331                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3332                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3333                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3334                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3335                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3336                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3337                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3338                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3339                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3340                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3341                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3342                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3343                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3344                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3345                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3346                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3347                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3348                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3349                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3350                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3351                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3352                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3353                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3354                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3355                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3356                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3357                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3358                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3359                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3360                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3361                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3362                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3363                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3364                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3365                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3366                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3367                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3368                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3369                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3370                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3371                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3372                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3373                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3374                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3375                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3376                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3377                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3378                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3379                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3380                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3381                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3382                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3383                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3384                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3385                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3386                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3387                 </fields>
3388                 <links>
3389                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3390                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3391                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3392                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3393                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3394                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3395                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3396                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3397                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3398                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3399                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3400                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3401                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3402                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3403                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3404                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3405                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3406                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3407                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3408                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3409                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3410                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3411                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3412                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3413                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3414                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3415                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3416                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3417                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3418                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3419                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3420                 </links>
3421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3422                         <actions>
3423                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3424                         </actions>
3425                 </permacrud>
3426         </class>
3427         <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">
3428                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3429                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3430                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3431                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3432                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3433                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3434                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3435                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3436                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3437         </fields>
3438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3439                         <actions>
3440                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3441                                 <retrieve/>
3442                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3443                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3444                         </actions>
3445                 </permacrud>
3446         </class>
3447         <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">
3448                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3449                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3450                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3451                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3452                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3453         </fields>
3454         <links>
3455                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3456                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3457                 </links>
3458                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3459                         <actions>
3460                                 <retrieve permission="RUN_REPORTS">
3461                                         <context link="usr" field="home_ou" />
3462                                 </retrieve>
3463                         </actions>
3464                 </permacrud>
3465         </class>
3466         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3467                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3468                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3469                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3470                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3471                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3472                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3473                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3474         </fields>
3475         <links>
3476                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3477                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3478                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3479                 </links>
3480                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3481                         <actions>
3482                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3483                                         <context link="usr" field="home_ou" />
3484                                         <context link="ws" field="owning_lib" />
3485                                 </retrieve>
3486                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3487                                         <context link="usr" field="home_ou" />
3488                                         <context link="ws" field="owning_lib" />
3489                                 </create>
3490                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3491                                         <context link="usr" field="home_ou" />
3492                                         <context link="ws" field="owning_lib" />
3493                                 </update>
3494                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3495                                         <context link="usr" field="home_ou" />
3496                                         <context link="ws" field="owning_lib" />
3497                                 </delete>
3498                         </actions>
3499                 </permacrud>
3500         </class>
3501         <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">
3502                 <fields oils_persist:primary="name">
3503                         <field name="name" reporter:datatype="text"/>
3504                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3505                 </fields>
3506                 <links/>
3507                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3508                         <actions>
3509                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3510                                 <retrieve/>
3511                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3512                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3513                         </actions>
3514                 </permacrud>
3515         </class>
3516         <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">
3517                 <fields oils_persist:primary="name">
3518                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3519                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3520                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3521                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3522                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3523                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3524                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3525                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3526                 </fields>
3527                 <links>
3528                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3529                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3530                 </links>
3531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3532                         <actions>
3533                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3534                                 <retrieve/>
3535                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3536                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3537                         </actions>
3538                 </permacrud>
3539         </class>
3540         <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">
3541                 <fields oils_persist:primary="name">
3542                         <field name="name" reporter:datatype="text"/>
3543                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3544                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3545                         <field name="datatype" reporter:datatype="text"/>
3546                         <field name="view_perm" reporter:datatype="link"/>
3547                         <field name="update_perm" reporter:datatype="link"/>
3548                         <field name="fm_class" reporter:datatype="text"/>
3549                         <field name="grp" reporter:datatype="link"/>
3550                 </fields>
3551                 <links>
3552                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3553                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3554                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3555                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3556                 </links>
3557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3558                         <actions>
3559                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3560                                 <retrieve/>
3561                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3562                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3563                         </actions>
3564                 </permacrud>
3565         </class>
3566         <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">
3567                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3568                         <field name="id" />
3569                         <field name="name"  reporter:datatype="text"/>
3570                         <field name="org_unit" reporter:datatype="org_unit"/>
3571                         <field name="value"  reporter:datatype="text"/>
3572                 </fields>
3573                 <links>
3574                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3575                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3576                 </links>
3577         </class>
3578         <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">
3579                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3580                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3581                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3582                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3583                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3584                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3585                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3586                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3587                 </fields>
3588                 <links>
3589                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3590                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3591                 </links>
3592         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3593             <actions>
3594                 <create permission="CREATE_COPY_NOTE">
3595                     <context link="owning_copy" field="circ_lib"/>
3596                 </create>
3597                 <retrieve permission="VIEW_COPY_NOTES">
3598                     <context link="owning_copy" field="circ_lib"/>
3599                 </retrieve>
3600                 <update permission="UPDATE_COPY_NOTE">
3601                     <context link="owning_copy" field="circ_lib"/>
3602                 </update>
3603                 <delete permission="DELETE_COPY_NOTE">
3604                     <context link="owning_copy" field="circ_lib"/>
3605                 </delete>
3606             </actions>
3607         </permacrud>
3608         </class>
3609         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3610                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3611                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3612                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3613                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3614                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3615                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3616                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3617                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3618                 </fields>
3619                 <links>
3620                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3621                 </links>
3622         </class>
3623         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3624                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3625                         <field name="fingerprint"  reporter:datatype="text"/>
3626                         <field name="id" reporter:datatype="id" />
3627                         <field name="master_record" reporter:datatype="link"/>
3628                         <field name="mods"  reporter:datatype="text"/>
3629                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3630                 </fields>
3631                 <links>
3632                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3633                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3634                 </links>
3635         </class>
3636         <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">
3637                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3638                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3639                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3640                 </fields>
3641                 <links/>
3642         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3643             <actions>
3644                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3645                 <retrieve/>
3646                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3647                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3648             </actions>
3649         </permacrud>
3650         </class>
3651         <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">
3652                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3653                         <field name="code"  reporter:datatype="text"/>
3654                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3655                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3656                 </fields>
3657                 <links/>
3658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3659             <actions>
3660                 <create permission="CREATE_PERM" global_required="true"/>
3661                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3662                 <update permission="UPDATE_PERM" global_required="true"/>
3663                 <delete permission="DELETE_PERM" global_required="true"/>
3664             </actions>
3665         </permacrud>
3666         </class>
3667         <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
3668                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3669                         <field name="id" reporter:datatype="id" />
3670                         <field name="metarecord" reporter:datatype="link"/>
3671                         <field name="source" reporter:datatype="link"/>
3672                 </fields>
3673                 <links>
3674                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3675                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3676                 </links>
3677         </class>
3678         <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">
3679                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3680                         <field name="id" reporter:datatype="id" />
3681                         <field name="field" reporter:datatype="link"/>
3682                         <field name="source" reporter:datatype="link"/>
3683                         <field name="value"  reporter:datatype="text"/>
3684                 </fields>
3685                 <links>
3686                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3687                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3688                 </links>
3689         </class>
3690         <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">
3691                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3692                         <field name="id" reporter:datatype="id" />
3693                         <field name="value" reporter:datatype="text"/>
3694                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3695                 </fields>
3696                 <links>
3697                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3698                 </links>
3699         </class>
3700         <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">
3701                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3702                         <field name="id" reporter:datatype="id" />
3703                         <field name="entry" reporter:datatype="link"/>
3704                         <field name="def" reporter:datatype="link"/>
3705                         <field name="source" reporter:datatype="link"/>
3706                 </fields>
3707                 <links>
3708                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3709                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3710                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3711                 </links>
3712         </class>
3713         <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">
3714                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3715                         <field name="id" reporter:datatype="id" />
3716                         <field name="entry" reporter:datatype="link"/>
3717                         <field name="simple_heading" reporter:datatype="link"/>
3718                 </fields>
3719                 <links>
3720                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3721                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3722                 </links>
3723         </class>
3724         <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">
3725                 <oils_persist:source_definition>
3726                         SELECT * FROM metabib.author_field_entry
3727                                                 UNION ALL
3728                         SELECT * FROM metabib.keyword_field_entry
3729                                                 UNION ALL
3730                         SELECT * FROM metabib.identifier_field_entry
3731                                                 UNION ALL
3732                         SELECT * FROM metabib.title_field_entry
3733                                                 UNION ALL
3734                         SELECT * FROM metabib.subject_field_entry
3735                                                 UNION ALL
3736                         SELECT * FROM metabib.series_field_entry
3737                 </oils_persist:source_definition>
3738                 <fields>
3739                         <field name="field" reporter:datatype="link"/>
3740                         <field name="id" reporter:datatype="id" />
3741                         <field name="source" reporter:datatype="link"/>
3742                         <field name="value"  reporter:datatype="text"/>
3743                 </fields>
3744                 <links>
3745                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3746                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3747                 </links>
3748         </class>
3749         <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">
3750                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3751                         <field name="field" reporter:datatype="link"/>
3752                         <field name="id" reporter:datatype="id" />
3753                         <field name="source" reporter:datatype="link"/>
3754                         <field name="value"  reporter:datatype="text"/>
3755                 </fields>
3756                 <links>
3757                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3758                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3759                 </links>
3760         </class>
3761         <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">
3762                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3763                         <field name="accepting_usr" reporter:datatype="link"/>
3764                         <field name="amount" reporter:datatype="money" />
3765                         <field name="amount_collected" reporter:datatype="money" />
3766                         <field name="cash_drawer" reporter:datatype="link"/>
3767                         <field name="id" reporter:datatype="id" />
3768                         <field name="note"  reporter:datatype="text"/>
3769                         <field name="payment_ts" reporter:datatype="timestamp"/>
3770                         <field name="xact" reporter:datatype="link"/>
3771                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3772                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3773                 </fields>
3774                 <links>
3775                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3776                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3777                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3778                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3779                 </links>
3780         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3781             <actions>
3782                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3783                     <context link="xact" jump="usr" field="home_ou"/>
3784                 </retrieve>
3785                         </actions>
3786                 </permacrud>
3787         </class>
3788         <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">
3789                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3790                         <field name="accepting_usr" reporter:datatype="link"/>
3791                         <field name="amount" reporter:datatype="money" />
3792                         <field name="amount_collected" reporter:datatype="money" />
3793                         <field name="id" reporter:datatype="id" />
3794                         <field name="note"  reporter:datatype="text"/>
3795                         <field name="payment_ts" reporter:datatype="timestamp"/>
3796                         <field name="xact" reporter:datatype="link"/>
3797                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3798                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3799                 </fields>
3800                 <links>
3801                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3802                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3803                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3804                 </links>
3805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3806             <actions>
3807                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3808                     <context link="xact" jump="usr" field="home_ou"/>
3809                 </retrieve>
3810                         </actions>
3811                 </permacrud>
3812         </class>
3813         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3814                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3815                         <field name="accepting_usr" reporter:datatype="link"/>
3816                         <field name="amount" reporter:datatype="money" />
3817                         <field name="amount_collected" reporter:datatype="money" />
3818                         <field name="id" reporter:datatype="id" />
3819                         <field name="note"  reporter:datatype="text"/>
3820                         <field name="payment_ts" reporter:datatype="timestamp"/>
3821                         <field name="xact" reporter:datatype="link"/>
3822                         <field name="billing" reporter:datatype="link"/>
3823                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3824                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3825                 </fields>
3826                 <links>
3827                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3828                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3829                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3830                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3831                 </links>
3832         </class>
3833         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3834                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3835                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3836                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3837                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3838                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3839                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3840                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3841                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3842                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3843                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3844                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3845                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3846                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3847                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3848                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3849                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3850                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3851                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3852                 </fields>
3853                 <links>
3854                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3855                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3856                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3857                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3858                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3859                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3860                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3861                 </links>
3862         </class>
3863
3864         <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">
3865                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3866                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3867                         <field name="name"  reporter:datatype="text"/>
3868                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3869                         <field name="block_list" reporter:datatype="text"/>
3870                         <field name="staff_alert" reporter:datatype="bool"/>
3871                         <field name="org_depth" reporter:datatype="int"/>
3872                         <field name="ignore_proximity" reporter:datatype="int"/>
3873                 </fields>
3874                 <links/>
3875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3876             <actions>
3877                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3878                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3879                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3880                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3881             </actions>
3882         </permacrud>
3883         </class>
3884         <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">
3885                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3886                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3887                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3888                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3889                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3890                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3891                 </fields>
3892                 <links>
3893                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3894                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3895                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3896         </links>
3897         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3898             <actions>
3899                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3900                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3901                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3902                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3903             </actions>
3904         </permacrud>
3905         </class>
3906         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
3907                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3908                         <field name="holdable" reporter:datatype="bool"/>
3909                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3910                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3911                         <field name="opac_visible" reporter:datatype="bool"/>
3912             <field name="copy_active" reporter:datatype="bool"/>
3913             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3914             <field name="is_available" reporter:datatype="bool"/>
3915                 </fields>
3916                 <links/>
3917         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3918             <actions>
3919                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3920                 <retrieve/>
3921                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3922                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3923             </actions>
3924         </permacrud>
3925         </class>
3926         <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">
3927                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3928                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3929                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3930                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3931                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3932                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3933                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3934                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3935                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3936                 </fields>
3937                 <links>
3938                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3939                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3940                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3941                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3942                 </links>
3943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3944                         <actions>
3945                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3946                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3947                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3948                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3949                         </actions>
3950                 </permacrud>
3951         </class>
3952         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3953                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3954                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3955                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3956                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3957                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3958                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3959                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3960                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3961                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3962                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3963                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3964                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3965                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3966                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3967                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3968                 </fields>
3969                 <links>
3970                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3971                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3972                 </links>
3973         </class>
3974         <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">
3975                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3976                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3977                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3978                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3979                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3980                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3981                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3982                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3983                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3984                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3985                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3986                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3987                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3988                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3989                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3990                 </fields>
3991                 <links>
3992                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3993                 </links>
3994                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3995                         <actions>
3996                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3997                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3998                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3999                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4000                         </actions>
4001                 </permacrud>
4002         </class>
4003
4004
4005         <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">
4006                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4007                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4008                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4009                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4010                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4011                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4012                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4013                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4014                 </fields>
4015                 <links>
4016                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4017                 </links>
4018         </class>
4019
4020         <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">
4021                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4022                         <field name="call_number" />
4023                         <field name="create_date" reporter:datatype="timestamp"/>
4024                         <field name="creator" reporter:datatype="link"/>
4025                         <field name="id" reporter:datatype="id" />
4026                         <field name="pub" reporter:datatype="bool"/>
4027                         <field name="title"  reporter:datatype="text"/>
4028                         <field name="value"  reporter:datatype="text"/>
4029                 </fields>
4030                 <links>
4031                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4032                 </links>
4033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4034             <actions>
4035                 <create permission="CREATE_VOLUME_NOTE">
4036                     <context link="call_number" field="owning_lib"/>
4037                 </create>
4038                 <retrieve permission="VIEW_VOLUME_NOTES">
4039                     <context link="call_number" field="owning_lib"/>
4040                 </retrieve>
4041                 <update permission="UPDATE_VOLUME_NOTE">
4042                     <context link="call_number" field="owning_lib"/>
4043                 </update>
4044                 <delete permission="DELETE_VOLUME_NOTE">
4045                     <context link="call_number" field="owning_lib"/>
4046                 </delete>
4047             </actions>
4048         </permacrud>
4049         </class>
4050         <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">
4051                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4052                         <field name="create_date" reporter:datatype="timestamp"/>
4053                         <field name="creator" reporter:datatype="link"/>
4054                         <field name="edit_date" reporter:datatype="timestamp"/>
4055                         <field name="editor" reporter:datatype="link"/>
4056                         <field name="id" reporter:datatype="id" />
4057                         <field name="record" reporter:datatype="link"/>
4058                         <field name="value" reporter:datatype="text"/>
4059                 </fields>
4060                 <links>
4061                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4062                 </links>
4063         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4064             <actions>
4065                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4066                 <retrieve/>
4067                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4068                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4069             </actions>
4070         </permacrud>
4071         </class>
4072         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4073         <oils_persist:source_definition>
4074 SELECT  usr,
4075         SUM(
4076             CASE
4077                 WHEN (
4078                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4079                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4080                 ) THEN 1
4081                 ELSE 0
4082             END
4083         ) AS out,
4084
4085         SUM(
4086             CASE
4087                 WHEN (
4088                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4089                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4090                 ) THEN 1
4091                 ELSE 0
4092             END
4093         ) AS overdue,
4094
4095         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4096         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4097         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4098   FROM  action.circulation
4099   WHERE checkin_time IS NULL
4100   GROUP BY 1
4101         </oils_persist:source_definition>
4102         <fields oils_persist:primary="usr">
4103             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4104             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4105             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4106             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4107             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4108             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4109         </fields>
4110         <links>
4111             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4112         </links>
4113         </class>
4114         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4115         <oils_persist:source_definition>
4116 SELECT  usr,
4117         STRING_AGG(
4118             CASE
4119                 WHEN (
4120                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4121                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4122                 ) THEN id::TEXT
4123                 ELSE '0'
4124             END
4125         ,',') AS out,
4126
4127         STRING_AGG(
4128             CASE
4129                 WHEN (
4130                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4131                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4132                 ) THEN id::TEXT
4133                 ELSE '0'
4134             END
4135         ,',') AS overdue,
4136
4137         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4138         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4139         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4140   FROM  action.circulation
4141   WHERE checkin_time IS NULL
4142   GROUP BY 1
4143         </oils_persist:source_definition>
4144         <fields oils_persist:primary="usr">
4145             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4146             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4147             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4148             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4149             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4150             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4151         </fields>
4152         <links>
4153             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4154         </links>
4155         </class>
4156         <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">
4157                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4158                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4159                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4160                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4161                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4162                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4163                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4164                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4165                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4166                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4167                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4168                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4169                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4170                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4171                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4172                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4173                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4174                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4175                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4176                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4177                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4178                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4179                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4180                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4181                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4182                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4183                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4184                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4185                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4186                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4187                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4188                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4189                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4190                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4191                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4192                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4193                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4194                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4195                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4196                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4197                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4198                 </fields>
4199                 <links>
4200                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4201                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4202                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4203                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4204                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4205                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4206                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4207                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4208                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4209                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4210                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4211                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4212                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4213                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4214                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4215                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4216                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4217                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4218                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4219                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4220                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4221                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4222                 </links>
4223                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4224                         <actions>
4225                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4226                         </actions>
4227                 </permacrud>
4228         </class>
4229         <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">
4230                 <fields>
4231                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4232                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4233                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4234                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4235                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4236                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4237                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4238                 </fields>
4239                 <links>
4240                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4241                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4242                 </links>
4243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4244                         <actions>
4245                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4246                         </actions>
4247                 </permacrud>
4248         </class>
4249         <class id="aacs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_slim" oils_persist:tablename="action.all_circulation_slim" reporter:core="true" reporter:label="Combined Aged and Active circulations" oils_persist:readonly="true">
4250                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4251                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4252                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4253                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4254                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4255                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4256                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4257                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4258                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4259                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4260                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4261                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4262                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4263                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4264                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4265                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4266                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4267                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4268                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4269                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4270                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4271                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4272                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4273                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4274                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4275                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4276                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4277                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4278                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4279                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4280                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4281                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4282                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4283                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4284                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4285                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4286                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4287                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4288                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4289                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4290                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4291                 </fields>
4292                 <links>
4293                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4294                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4295                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4296                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4297                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4298                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4299                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4300                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4301                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4302                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4303                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4304                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4305                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4306                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4307                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4308                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4309                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4310                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4311                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4312                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4313                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4314                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4315                 </links>
4316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4317                         <actions>
4318                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4319                         </actions>
4320                 </permacrud>
4321         </class>
4322
4323         <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">
4324                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4325                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4326                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4327                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4328                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4329                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4330                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4331                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4332                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4333                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4334                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4335                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4336                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4337                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4338                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4339                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4340                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4341                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4342                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4343                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4344                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4345                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4346                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4347                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4348                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4349                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4350                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4351                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4352                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4353                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4354                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4355                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4356                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4357                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4358                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4359                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4360                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4361                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4362                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4363                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4364                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4365                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4366                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4367                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4368                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4369                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4370                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4371                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4372                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4373                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4374                 </fields>
4375                 <links>
4376                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4377                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4378                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4379                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4380                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4381                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4382                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4383                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4384                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4385                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4386                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4387                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4388                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4389                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4390                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4391                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4392                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4393                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4394                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4395                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4396                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4397                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4398                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4399                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4400                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4401                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4402                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4403                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4404                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4405                 </links>
4406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4407                         <actions>
4408                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4409                         </actions>
4410                 </permacrud>
4411         </class>
4412         <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">
4413                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4414                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4415                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4416                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4417                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4418                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4419                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4420                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4421                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4422                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4423                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4424                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4425                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4426                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4427                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4428                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4429                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4430                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4431                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4432                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4433                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4434                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4435                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4436                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4437                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4438                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4439                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4440                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4441                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4442                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4443                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4444                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4445                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4446                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4447                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4448                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4449                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4450                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4451                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4452                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4453                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4454                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4455                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4456                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4457                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4458                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4459                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4460                 </fields>
4461                 <links>
4462                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4463                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4464                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4465                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4466                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4467                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4468                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4469                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4470                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4471                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4472                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4473                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4474                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4475                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4476                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4477                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4478                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4479                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4480                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4481                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4482                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4483                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4484                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4485                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4486                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4487                 </links>
4488         </class>
4489         <class id="auch" 
4490                 controller="open-ils.cstore" 
4491                 oils_obj:fieldmapper="action::user_circ_history" 
4492                 oils_persist:tablename="action.usr_circ_history" 
4493                 reporter:label="User Checkout History">
4494                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4495                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4496                         <!-- prevent reporting on the user that owns the checkout history -->
4497                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4498                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4499                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4500                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4501                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4502                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4503                 </fields>
4504                 <links>
4505                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4506                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4507                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4508                 </links>
4509         </class>
4510         <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">
4511                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4512                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4513                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4514                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4515                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4516                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4517                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4518                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4519                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4520                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4521                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4522                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4523                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4524                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4525                 </fields>
4526                 <links>
4527                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4528                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4529                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4530                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4531                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4532                 </links>
4533                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4534                         <actions>
4535                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4536                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4537                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4538                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4539                         </actions>
4540                 </permacrud>
4541         </class>
4542
4543         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4544                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4545                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4546                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4547                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4548                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4549                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4550                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4551                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4552                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4553                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4554                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4555                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4556                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4557                 </fields>
4558                 <links>
4559                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4560                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4561                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4562                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4563                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4564                 </links>
4565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4566                         <actions>
4567                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4568                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4569                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4570                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4571                         </actions>
4572                 </permacrud>
4573         </class>
4574         
4575         <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">
4576                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4577                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4578                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4579                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4580                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4581                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4582                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4583                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4584                 </fields>
4585                 <links>
4586                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4587                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4588                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4589                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4590                 </links>
4591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4592                         <actions>
4593                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4594                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4595                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4596                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4597                         </actions>
4598                 </permacrud>
4599         </class>
4600         
4601         <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">
4602                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4603                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4604                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4605                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4606                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4607                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4608                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4609                 </fields>
4610                 <links>
4611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4612                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4613                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4614                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4615                 </links>
4616                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4617                         <actions>
4618                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4619                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4620                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4621                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4622                         </actions>
4623                 </permacrud>
4624         </class>
4625         
4626         <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">
4627                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4628                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4629                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4630                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4631                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4632                 </fields>
4633                 <links>
4634                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4635                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4636                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4637                 </links>
4638                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4639                         <actions>
4640                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4641                     <context link="resource" field="owner" />
4642                 </create>
4643                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4644                     <context link="resource" field="owner" />
4645                 </retrieve>
4646                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4647                     <context link="resource" field="owner" />
4648                 </update>
4649                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4650                     <context link="resource" field="owner" />
4651                 </delete>
4652                         </actions>
4653                 </permacrud>
4654         </class>
4655         
4656         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4657                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4658                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4659                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4660                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4661                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4662                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4663                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4664                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4665                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4666                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4667                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4668                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4669                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4670                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4671                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4672                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4673                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4674                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4675                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4676                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4677                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4678                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4679                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4680                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4681                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4682                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4683                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4684                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4685                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4686                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4687                 </fields>
4688                 <links>
4689                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4690                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4691                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4692                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4693                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4694                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4695                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4696                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4697                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4698                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4699                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4700                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4701                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4702                 </links>
4703                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4704                         <actions>
4705                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4706                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4707                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4708                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4709                         </actions>
4710                 </permacrud>
4711         </class>
4712         
4713         <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">
4714                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4715                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4716                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4717                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4718                 </fields>
4719                 <links>
4720                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4721                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4722                 </links>
4723                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4724                         <actions>
4725                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4726                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4727                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4728                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4729                         </actions>
4730                 </permacrud>
4731         </class>
4732
4733         <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
4734                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4735                         <field name="bucket" reporter:datatype="link"/>
4736                         <field name="id" reporter:datatype="id" />
4737                         <field name="target_call_number" reporter:datatype="link" />
4738                         <field name="create_time" reporter:datatype="timestamp" />
4739                         <field name="pos" reporter:datatype="int" />
4740                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4741                 </fields>
4742                 <links>
4743                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4744                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4745             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4746                 </links>
4747         </class>
4748         <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">
4749                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4750                         <field name="id" reporter:datatype="id" />
4751                         <field name="item" reporter:datatype="link"/>
4752                         <field name="note" reporter:datatype="text" />
4753                 </fields>
4754                 <links>
4755                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4756                 </links>
4757         </class>
4758         <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
4759                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4760                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4761                         <field name="btype" reporter:datatype="text"/>
4762                         <field name="id" reporter:datatype="id" />
4763                         <field name="name" reporter:datatype="text"/>
4764                         <field name="description" reporter:datatype="text"/>
4765                         <field name="owner" reporter:datatype="link"/>
4766                         <field name="pub" reporter:datatype="bool"/>
4767                         <field name="create_time" reporter:datatype="timestamp" />
4768                 </fields>
4769                 <links>
4770                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4771                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4772                 </links>
4773         </class>
4774         <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">
4775                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4776                         <field name="id" reporter:datatype="id" />
4777                         <field name="bucket" reporter:datatype="link"/>
4778                         <field name="note" reporter:datatype="text" />
4779                 </fields>
4780                 <links>
4781                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4782                 </links>
4783         </class>
4784         <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">
4785                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4786                         <field name="hold" reporter:datatype="link"/>
4787                         <field name="id" reporter:datatype="id" />
4788                         <field name="target_copy" reporter:datatype="link"/>
4789                         <field name="proximity" reporter:datatype="number"/>
4790                 </fields>
4791                 <links>
4792                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4793                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4794                 </links>
4795         </class>
4796         <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">
4797                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4798                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4799                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4800                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4801                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4802                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4803                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4804                 </fields>
4805                 <links>
4806                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4807                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4808                 </links>
4809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4810             <actions>
4811                 <create permission="CREATE_HOLD_NOTIFICATION">
4812                                         <context link="hold" jump="usr" field="home_ou" />
4813                                 </create>
4814                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4815                                         <context link="hold" jump="usr" field="home_ou" />
4816                                 </retrieve>
4817                 <update permission="CREATE_HOLD_NOTIFICATION">
4818                                         <context link="hold" jump="usr" field="home_ou" />
4819                                 </update>
4820                 <delete permission="CREATE_HOLD_NOTIFICATION">
4821                                         <context link="hold" jump="usr" field="home_ou" />
4822                                 </delete>
4823             </actions>
4824         </permacrud>
4825         </class>
4826         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location"  oils_persist:field_safe="true">
4827                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4828                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4829                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4830                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4831                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4832                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4833                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4834                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4835                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4836                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4837                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4838                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4839                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4840                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4841                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4842                 </fields>
4843                 <links>
4844                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4845                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4846                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4847                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4848                 </links>
4849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4850             <actions>
4851                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4852                 <retrieve/>
4853                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4854                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4855             </actions>
4856         </permacrud>
4857         </class>
4858         <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">
4859                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4860                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4861                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4862                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4863                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4864             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4865             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4866             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4867                 </fields>
4868                 <links>
4869                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4870                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4871                 </links>
4872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4873             <actions>
4874                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4875                 <retrieve/>
4876                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4877                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4878             </actions>
4879         </permacrud>
4880         </class>
4881         <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">
4882                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4883                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4884             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4885             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4886                 </fields>
4887                 <links>
4888                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4889                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4890                 </links>
4891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4892             <actions>
4893                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4894                                         <context link="lgroup" field="owner" />
4895                 </create>
4896                 <retrieve/>
4897                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4898                                         <context link="lgroup" field="owner" />
4899                 </update>
4900                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4901                                         <context link="lgroup" field="owner" />
4902                 </delete>
4903             </actions>
4904         </permacrud>
4905         </class>
4906
4907     <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">
4908         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4909             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4910             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4911             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4912             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4913         </fields>
4914         <links>
4915             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4916             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4917         </links>
4918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4919             <actions>
4920                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4921                 <retrieve/>
4922                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4923                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4924             </actions>
4925         </permacrud>
4926     </class>
4927
4928         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4929                 <fields>
4930                         <field name="sre_id" oils_persist:virtual="true" />
4931                         <field name="location" oils_persist:virtual="true" />
4932                         <field name="owning_lib" oils_persist:virtual="true" />
4933                         <field name="basic_holdings" oils_persist:virtual="true" />
4934                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4935                         <field name="supplement_holdings" oils_persist:virtual="true" />
4936                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4937                         <field name="index_holdings" oils_persist:virtual="true" />
4938                         <field name="index_holdings_add" oils_persist:virtual="true" />
4939                         <field name="online" oils_persist:virtual="true" />
4940                         <field name="missing" oils_persist:virtual="true" />
4941                         <field name="incomplete" oils_persist:virtual="true" />
4942                 </fields>
4943         </class>
4944
4945         <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">
4946                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4947                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4948                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4949                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4950                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4951                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4952                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4953                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4954                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4955                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4956                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4957                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4958                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4959                 </fields>
4960                 <links>
4961                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4962                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4963                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4964                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4965                 </links>
4966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4967                         <actions>
4968                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4969                                 <retrieve/>
4970                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4971                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4972                         </actions>
4973                 </permacrud>
4974         </class>
4975
4976         <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">
4977                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4978                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4979                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4980                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4981                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4982                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4983                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4984                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4985                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4986                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4987                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4988                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4989                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4990                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4991                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4992                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4993                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4994                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4995                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4996                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4997                 </fields>
4998                 <links>
4999                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5000                 </links>
5001                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5002                         <actions>
5003                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5004                                         <context link="subscription" field="owning_lib" />
5005                                 </create>
5006                                 <retrieve />
5007                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5008                                         <context link="subscription" field="owning_lib" />
5009                                 </update>
5010                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5011                                         <context link="subscription" field="owning_lib" />
5012                                 </delete>
5013                         </actions>
5014                 </permacrud>
5015         </class>
5016
5017         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5018                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5019                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5020                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5021                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5022                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5023                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5024                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5025                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5026                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5027                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5028                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5029                 </fields>
5030                 <links>
5031                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5032                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5033                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5034                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5035                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5036                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5037                 </links>
5038                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5039                         <actions>
5040                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5041                                 <retrieve />
5042                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5043                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5044                         </actions>
5045                 </permacrud>
5046         </class>
5047
5048         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
5049                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5050                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5051                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5052                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5053                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5054                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5055                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5056                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5057                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5058                 </fields>
5059                 <links>
5060                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5061                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5062                 </links>
5063         </class>
5064
5065         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5066                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5067                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5068                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5069                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5070                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5071                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5072                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5073                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5074                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5075                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5076                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5077                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5078                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5079                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5080                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5081                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5082                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5083                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5084                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5085                 </fields>
5086                 <links>
5087                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5088                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5089                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5090                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5091                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5092                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5093                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5094                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5095                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5096                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5097                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5098                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5099                 </links>
5100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5101                         <actions>
5102                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5103                                 <retrieve />
5104                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5105                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5106                         </actions>
5107                 </permacrud>
5108         </class>
5109
5110         <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">
5111                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5112                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5113                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5114                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5115                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5116                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5117                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5118                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5119                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5120                 </fields>
5121                 <links>
5122                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5123                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5124                 </links>
5125                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5126                         <actions>
5127                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5128                                         <context link="distribution" field="holding_lib" />
5129                                 </create>
5130                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5131                                         <context link="distribution" field="holding_lib" />
5132                                 </retrieve>
5133                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5134                                         <context link="distribution" field="holding_lib" />
5135                                 </update>
5136                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5137                                         <context link="distribution" field="holding_lib" />
5138                                 </delete>
5139                         </actions>
5140                 </permacrud>
5141         </class>
5142
5143         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5144                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5145                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5146                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5147                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5148                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5149                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5150                 </fields>
5151                 <links>
5152                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5153                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
5154                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5155                 </links>
5156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5157                         <actions>
5158                                 <create permission="ADMIN_SERIAL_STREAM">
5159                                         <context link="distribution" field="holding_lib" />
5160                                 </create>
5161                                 <retrieve />
5162                                 <update permission="ADMIN_SERIAL_STREAM">
5163                                         <context link="distribution" field="holding_lib" />
5164                                 </update>
5165                                 <delete permission="ADMIN_SERIAL_STREAM">
5166                                         <context link="distribution" field="holding_lib" />
5167                                 </delete>
5168                         </actions>
5169                 </permacrud>
5170         </class>
5171
5172         <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">
5173                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5174                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5175                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5176                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5177                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5178                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5179                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5180                 </fields>
5181                 <links>
5182                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5183                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5184                 </links>
5185                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5186                         <actions>
5187                                 <create permission="ADMIN_SERIAL_STREAM">
5188                                         <context link="stream" jump="distribution" field="holding_lib" />
5189                                 </create>
5190                                 <retrieve permission="RECEIVE_SERIAL">
5191                                         <context link="stream" jump="distribution" field="holding_lib" />
5192                                 </retrieve>
5193                                 <update permission="ADMIN_SERIAL_STREAM">
5194                                         <context link="stream" jump="distribution" field="holding_lib" />
5195                                 </update>
5196                                 <delete permission="ADMIN_SERIAL_STREAM">
5197                                         <context link="stream" jump="distribution" field="holding_lib" />
5198                                 </delete>
5199                         </actions>
5200                 </permacrud>
5201         </class>
5202
5203         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5204                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5205                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5206                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5207                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5208                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5209                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5210                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5211                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5212                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5213                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5214                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5215                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5216                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5217                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5218                 </fields>
5219                 <links>
5220                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5221                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5222                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5223                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5224                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5225                 </links>
5226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5227                         <actions>
5228                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5229                                         <context link="subscription" field="owning_lib" />
5230                                 </create>
5231                                 <retrieve/>
5232                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5233                                         <context link="subscription" field="owning_lib" />
5234                                 </update>
5235                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5236                                         <context link="subscription" field="owning_lib" />
5237                                 </delete>
5238                         </actions>
5239                 </permacrud>
5240         </class>
5241
5242         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5243                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5244                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5245                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5246                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5247                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5248                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5249                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5250                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5251                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5252                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5253                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5254                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5255                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5256                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5257                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5258                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5259                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5260                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5261                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5262                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5263                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5264                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5265                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5266                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5267                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5268                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5269                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5270                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5271                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5272                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5273                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5274                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5275                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5276                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5277                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5278                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5279                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5280                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5281                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5282                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5283                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5284                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5285                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5286                 </fields>
5287                 <links>
5288                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5289                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5290                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5291                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5292                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5293                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5294                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5295                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5296                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5297                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5298                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5299                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5300                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5301                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5302                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5303                 </links>
5304                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5305                         <actions>
5306                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5307                                 <retrieve/>
5308                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5309                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5310                         </actions>
5311                 </permacrud>
5312         </class>
5313
5314         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5315                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5316                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5317                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5318                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5319                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5320                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5321                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5322                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5323                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5324                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5325                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5326                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5327                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5328                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5329                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5330                 </fields>
5331                 <links>
5332                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5333                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5334                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5335                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5336                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5337                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5338                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5339                 </links>
5340                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5341                         <actions>
5342                                 <create permission="ADMIN_SERIAL_ITEM">
5343                                         <context link="stream" jump="distribution" field="holding_lib" />
5344                                 </create>
5345                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5346                                         <context link="stream" jump="distribution" field="holding_lib" />
5347                                 </retrieve>
5348                                 <update permission="ADMIN_SERIAL_ITEM">
5349                                         <context link="stream" jump="distribution" field="holding_lib" />
5350                                 </update>
5351                                 <delete permission="ADMIN_SERIAL_ITEM">
5352                                         <context link="stream" jump="distribution" field="holding_lib" />
5353                                 </delete>
5354                         </actions>
5355                 </permacrud>
5356         </class>
5357
5358         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5359                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5360                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5361                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5362                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5363                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5364                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5365                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5366                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5367                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5368                 </fields>
5369                 <links>
5370                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5371                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5372                 </links>
5373                 <!-- Not available via PCRUD at this time -->
5374         </class>
5375         <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">
5376                 <fields>
5377                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5378                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5379                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5380                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5381                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5382                 </fields>
5383                 <links>
5384                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5385                 </links>
5386         </class>
5387         <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">
5388                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5389                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5390                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5391                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5392                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5393                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5394                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5395                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5396                 </fields>
5397                 <links>
5398                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5399                 </links>
5400         </class>
5401         <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">
5402                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5403                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5404                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5405                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5406                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5407                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5408                 </fields>
5409                 <links>
5410                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5411                 </links>
5412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5413                         <actions>
5414                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5415                                         <context link="distribution" field="holding_lib" />
5416                                 </create>
5417                                 <retrieve/>
5418                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5419                                         <context link="distribution" field="holding_lib" />
5420                                 </update>
5421                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5422                                         <context link="distribution" field="holding_lib" />
5423                                 </delete>
5424                         </actions>
5425                 </permacrud>
5426         </class>
5427
5428         <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">
5429                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5430                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5431                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5432                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5433                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5434                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5435                 </fields>
5436                 <links>
5437                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5438                 </links>
5439                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5440                         <actions>
5441                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5442                                         <context link="distribution" field="holding_lib" />
5443                                 </create>
5444                                 <retrieve/>
5445                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5446                                         <context link="distribution" field="holding_lib" />
5447                                 </update>
5448                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5449                                         <context link="distribution" field="holding_lib" />
5450                                 </delete>
5451                         </actions>
5452                 </permacrud>
5453         </class>
5454
5455         <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">
5456                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5457                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5458                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5459                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5460                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5461                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5462                 </fields>
5463                 <links>
5464                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5465                 </links>
5466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5467                         <actions>
5468                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5469                                         <context link="distribution" field="holding_lib" />
5470                                 </create>
5471                                 <retrieve/>
5472                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5473                                         <context link="distribution" field="holding_lib" />
5474                                 </update>
5475                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5476                                         <context link="distribution" field="holding_lib" />
5477                                 </delete>
5478                         </actions>
5479                 </permacrud>
5480         </class>
5481
5482         <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">
5483                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5484                         <field name="id" reporter:datatype="id" />
5485                         <field name="owning_copy" reporter:datatype="link"/>
5486                         <field name="stat_cat" reporter:datatype="link"/>
5487                         <field name="stat_cat_entry" reporter:datatype="link"/>
5488                 </fields>
5489                 <links>
5490                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5491                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5492                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5493                 </links>
5494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5495                         <actions>
5496                                 <retrieve/>
5497                         </actions>
5498                 </permacrud>
5499         </class>
5500         <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">
5501                 <fields oils_persist:primary="code">
5502                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5503                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5504                 </fields>
5505                 <links/>
5506         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5507             <actions>
5508                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5509                 <retrieve/>
5510                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5511                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5512             </actions>
5513         </permacrud>
5514         </class>
5515         <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">
5516                 <fields oils_persist:primary="code">
5517                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5518                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5519                 </fields>
5520                 <links/>
5521         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5522             <actions>
5523                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5524                 <retrieve/>
5525                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5526                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5527             </actions>
5528         </permacrud>
5529         </class>
5530         <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">
5531                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5532                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5533                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5534                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5535                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5536                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5537                 </fields>
5538                 <links>
5539             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5540         </links>
5541         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5542             <actions>
5543                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5544                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5545                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5546                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5547             </actions>
5548         </permacrud>
5549         </class>
5550         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Org Lasso">
5551                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5552                         <field name="id" reporter:datatype="id" />
5553                         <field name="name" reporter:datatype="text"/>
5554                 </fields>
5555                 <links/>
5556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5557             <actions>
5558                 <create permission="CREATE_LASSO" global_required="true"/>
5559                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5560                 <update permission="UPDATE_LASSO" global_required="true"/>
5561                 <delete permission="DELETE_LASSO" global_required="true"/>
5562             </actions>
5563         </permacrud>
5564         </class>
5565         <class id="lmap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso_map" oils_persist:tablename="actor.org_lasso_map" reporter:label="Org Lasso Map">
5566                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5567                         <field name="id" reporter:datatype="id" />
5568                         <field name="lasso" reporter:datatype="link"/>
5569                         <field name="org_unit" reporter:datatype="org_unit"/>
5570                 </fields>
5571                 <links>
5572                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5573                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5574                 </links>
5575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5576             <actions>
5577                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5578                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5579                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5580                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5581             </actions>
5582         </permacrud>
5583         </class>
5584         <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">
5585                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5586                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5587                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5588                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5589                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5590                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5591                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5592                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5593                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5594                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5595                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5596                 </fields>
5597                 <links>
5598                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5599                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5600                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5601                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5602                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5603                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5604                 </links>
5605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5606             <actions>
5607                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5608                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5609                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5610                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5611             </actions>
5612         </permacrud>
5613         </class>
5614         <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">
5615                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5616                         <field name="id" reporter:datatype="id" />
5617                         <field name="from_org" reporter:datatype="org_unit"/>
5618                         <field name="to_org" reporter:datatype="org_unit"/>
5619                         <field name="prox" reporter:datatype="int" />
5620                 </fields>
5621                 <links>
5622                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5623                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5624                 </links>
5625         </class>
5626         <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">
5627                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5628                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5629                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5630                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5631                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5632                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5633                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5634                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5635                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5636                 </fields>
5637                 <links/>
5638         </class>
5639         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5640                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5641                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5642                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5643                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5644                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5645                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5646                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5647                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5648                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5649                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5650                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5651                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5652                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5653                 </fields>
5654                 <links>
5655                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5656                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5657                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5658                 </links>
5659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5660             <actions>
5661                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5662                 <retrieve/>
5663                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5664                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5665             </actions>
5666         </permacrud>
5667         </class>
5668         <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">
5669                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5670                         <field name="address_type"  reporter:datatype="text"/>
5671                         <field name="city"  reporter:datatype="text"/>
5672                         <field name="country"  reporter:datatype="text"/>
5673                         <field name="county"  reporter:datatype="text"/>
5674                         <field name="id" reporter:datatype="id" />
5675                         <field name="org_unit" reporter:datatype="org_unit"/>
5676                         <field name="post_code"  reporter:datatype="text"/>
5677                         <field name="state"  reporter:datatype="text"/>
5678                         <field name="street1"  reporter:datatype="text"/>
5679                         <field name="street2"  reporter:datatype="text"/>
5680                         <field name="valid" reporter:datatype="bool"/>
5681                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5682                 </fields>
5683                 <links>
5684                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5685                 </links>
5686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5687             <actions>
5688                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5689                 <retrieve/>
5690                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5691                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5692             </actions>
5693         </permacrud>
5694         </class>
5695         <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">
5696                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5697                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5698                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5699                         <field name="query_text" reporter:datatype="text"/>
5700                 </fields>
5701         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5702             <actions>
5703                 <retrieve/>
5704             </actions>
5705         </permacrud>
5706         </class>
5707
5708         <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">
5709                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5710                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5711                         <field name="owner" reporter:datatype="org_unit"/>
5712                         <field name="code" reporter:datatype="text"/>
5713                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5714                         <field name="create_date" reporter:datatype="timestamp"/>
5715                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5716                 </fields>
5717                 <links>
5718                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5719                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5720                 </links>
5721         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5722             <actions>
5723                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5724                 <retrieve/>
5725                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5726                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5727             </actions>
5728         </permacrud>
5729         </class>
5730         <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">
5731                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5732                         <field name="id" reporter:datatype="id"/>
5733                         <field name="grp" reporter:datatype="link"/>
5734                         <field name="pos" reporter:datatype="int"/>
5735                         <field name="query" reporter:datatype="link"/>
5736                 </fields>
5737                 <links>
5738                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5739                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5740                 </links>
5741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5742             <actions>
5743                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5744                     <context link="grp" field="owner"/>
5745                 </create>
5746                 <retrieve/>
5747                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5748                     <context link="grp" field="owner"/>
5749                 </update>
5750                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5751                     <context link="grp" field="owner"/>
5752                 </delete>
5753             </actions>
5754         </permacrud>
5755         </class>
5756
5757         <!-- A note: Please update alhr and ahopl when updating ahr -->
5758         <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">
5759                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5760                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5761                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5762                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5763                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5764                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5765                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5766                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5767                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5768                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5769                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5770                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5771                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5772                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5773                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5774                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5775                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5776                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5777                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5778                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5779                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5780                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5781                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5782                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5783                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5784                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5785                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5786                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5787                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5788                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5789                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5790                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5791                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5792                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5793                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5794                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5795                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5796                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5797                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5798                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5799                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5800                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5801                 </fields>
5802                 <links>
5803                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5804                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5805                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5806                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5807                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5808                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5809                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5810                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5811                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5812                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5813                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5814                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5815                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5816                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5817                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5818                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5819                 </links>
5820                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5821                         <actions>
5822                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5823                         </actions>
5824                 </permacrud>
5825         </class>
5826         <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">
5827                 <oils_persist:source_definition><![CDATA[
5828                 SELECT
5829                         ahr.*,
5830                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5831                                 copy_location_order_position,
5832                         CASE WHEN au.alias IS NOT NULL THEN
5833                                 au.alias
5834                         ELSE
5835                                 au.first_given_name
5836                         END AS usr_alias_or_first_given_name,
5837                         au.first_given_name AS usr_first_given_name,
5838                         au.second_given_name AS usr_second_given_name,
5839                         au.family_name AS usr_family_name,
5840                         au.prefix AS usr_prefix,
5841                         au.suffix AS usr_suffix,
5842                         au.alias AS usr_alias,
5843                         CASE WHEN au.alias IS NOT NULL THEN
5844                                 au.alias
5845                         ELSE
5846                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5847                                         COALESCE(au.family_name, ''),
5848                                         COALESCE(au.suffix, ''),
5849                                         ', ',
5850                                         COALESCE(au.prefix, ''),
5851                                         COALESCE(au.first_given_name, ''),
5852                                         COALESCE(au.second_given_name, '')
5853                                 ], ' '), E'\\s+,', ',')
5854                         END AS usr_alias_or_display_name,
5855                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5856                                 COALESCE(au.family_name, ''),
5857                                 COALESCE(au.suffix, ''),
5858                                 ', ',
5859                                 COALESCE(au.prefix, ''),
5860                                 COALESCE(au.first_given_name, ''),
5861                                 COALESCE(au.second_given_name, '')
5862                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5863                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5864                                 AS call_number_label,
5865                         siss.label AS issuance_label,
5866                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5867                         ahcm_1.copy_count AS potential_copies
5868                 FROM action.hold_request ahr
5869                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5870                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5871                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5872                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5873                 JOIN actor.usr au ON (au.id = ahr.usr)
5874                 JOIN (
5875                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5876                         FROM asset.copy_location
5877                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5878                 LEFT JOIN actor.usr_standing_penalty ausp 
5879                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5880                 LEFT JOIN config.standing_penalty csp
5881                         ON (
5882                                 csp.id = ausp.standing_penalty AND 
5883                                 csp.block_list LIKE '%CAPTURE%' AND (
5884                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5885                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5886                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5887                                         )
5888                                 )
5889                         )
5890                 JOIN (
5891                         SELECT COUNT(target_copy) AS copy_count, hold
5892                         FROM action.hold_copy_map
5893                         GROUP BY 2
5894                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5895                 LEFT JOIN serial.issuance siss
5896                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5897                 LEFT JOIN asset.copy_location_order acplo
5898                         ON (acp.location = acplo.location AND
5899                                 acp.circ_lib = acplo.org)
5900                 WHERE
5901                         ahr.capture_time IS NULL AND
5902                         ahr.cancel_time IS NULL AND
5903                         csp.id IS NULL AND
5904                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5905                         acp.status IN (0,7)
5906                 ]]></oils_persist:source_definition>
5907                 <fields oils_persist:primary="id">
5908                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5909                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5910                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5911                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5912                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5913                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5914                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5915                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5916                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5917                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5918                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5919                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5920                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5921                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5922                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5923                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5924                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5925                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5926                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5927                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5928                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5929                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5930                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5931                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5932                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5933                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5934                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5935                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5936                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5937                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5938                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5939                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5940                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5941                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5942                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5943                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5944                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5945                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5946                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5947                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5948                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5949                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5950                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5951                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5952                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5953                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5954                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5955                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5956                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5957                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5958                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5959                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5960                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5961                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5962                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5963                 </fields>
5964                 <links>
5965                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5966                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5967                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5968                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5969                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5970                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5971                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5972                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5973                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5974                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5975                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5976                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5977                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5978                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5979                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5980                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5981                 </links>
5982                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5983                         <actions>
5984                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5985                         </actions>
5986                 </permacrud>
5987         </class>
5988         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5989                 <oils_persist:source_definition>
5990                         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)
5991                 </oils_persist:source_definition>
5992                 <fields oils_persist:primary="id">
5993                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5994                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5995                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5996                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5997                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5998                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5999                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6000                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6001                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6002                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6003                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6004                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6005                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6006                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6007                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6008                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6009                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6010                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6011                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6012                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6013                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6014                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6015                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6016                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6017                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6018                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6019                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6020                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6021                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6022                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6023                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6024                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6025                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6026                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6027                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6028                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6029                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6030                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6031                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6032                 </fields>
6033                 <links>
6034                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6035                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6036                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6037                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6038                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6039                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6040                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6041                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6042                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6043                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6044                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6045                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6046                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6047                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6048                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6049                 </links>
6050         </class>
6051
6052         <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">
6053                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6054                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6055                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6056                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6057                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6058                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6059                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6060                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6061                 </fields>
6062                 <links>
6063                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6064                 </links>
6065                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6066                         <actions>
6067                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6068                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6069                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6070                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6071                         </actions>
6072                 </permacrud>
6073         </class>
6074         <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">
6075                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6076                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6077                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6078                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6079                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6080                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6081                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6082                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6083                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6084                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6085                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6086                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6087                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6088                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6089                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6090                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6091                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6092                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6093                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6094                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6095                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6096                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6097                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6098                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6099                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6100                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6101                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6102                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6103                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6104                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6105                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6106                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6107                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6108                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6109                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6110                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6111                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6112                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6113                 </fields>
6114                 <links>
6115                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6116                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6117                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6118                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6119                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6120                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6121                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6122                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6123                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6124                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6125                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6126                 </links>
6127                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6128                         <actions>
6129                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6130                         </actions>
6131                 </permacrud>
6132         </class>
6133         <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">
6134                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6135                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6136                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6137                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6138                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6139                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6140                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6141                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6142                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6143                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6144                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6145                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6146                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6147                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6148                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6149                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6150                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6151                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6152                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6153                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6154                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6155                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6156                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6157                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6158                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6159                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6160                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6161                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6162                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6163                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6164                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6165                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6166                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6167                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6168                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6169                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6170                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6171                 </fields>
6172                 <links>
6173                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6174                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6175                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6176                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6177                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6178                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6179                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6180                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6181                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6182                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6183                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6184                 </links>
6185                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6186                         <actions>
6187                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6188                         </actions>
6189                 </permacrud>
6190         </class>
6191
6192         <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">
6193                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6194                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6195                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6196                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6197                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6198                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6199                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6200                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6201                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6202                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6203                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6204                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6205                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6206                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6207                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6208                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6209                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6210                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6211                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6212                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6213                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6214                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6215                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6216                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6217                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6218                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6219                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6220                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6221                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6222                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6223                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6224                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6225                 </fields>
6226                 <links>
6227                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6228                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6229                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6230                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6231                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6232                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6233                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6234                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6235                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6236                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6237                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6238                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6239                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6240                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6241                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6242                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6243                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6244                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6245                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6246                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6247                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6248                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6249                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6250                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6251                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6252                 </links>
6253         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6254             <actions>
6255                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6256                 <retrieve />
6257                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6258                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6259             </actions>
6260         </permacrud>
6261         </class>
6262         <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">
6263                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6264                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6265                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6266                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6267                 </fields>
6268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6269                         <actions>
6270                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6271                                 <retrieve/>
6272                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6273                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6274                         </actions>
6275                 </permacrud>
6276         </class>
6277         <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">
6278                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6279                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6280                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6281                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6282                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6283                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6284                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6285                 </fields>
6286                 <links>
6287                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6288                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6289                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6290                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6291                 </links>
6292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6293                         <actions>
6294                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6295                                 <retrieve/>
6296                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6297                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6298                         </actions>
6299                 </permacrud>
6300         </class>
6301         <class id="ccnb" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
6302                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6303                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6304                         <field name="btype" reporter:datatype="text"/>
6305                         <field name="id" reporter:datatype="id" />
6306                         <field name="name"  reporter:datatype="text"/>
6307                         <field name="description" reporter:datatype="text"/>
6308                         <field name="owner" reporter:datatype="link"/>
6309                         <field name="pub" reporter:datatype="bool"/>
6310                         <field name="create_time" reporter:datatype="timestamp" />
6311                 </fields>
6312                 <links>
6313                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6314                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6315                 </links>
6316         </class>
6317         <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">
6318                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6319                         <field name="id" reporter:datatype="id" />
6320                         <field name="bucket" reporter:datatype="link"/>
6321                         <field name="note" reporter:datatype="text" />
6322                 </fields>
6323                 <links>
6324                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6325                 </links>
6326         </class>
6327         <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">
6328                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6329                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6330                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6331                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6332                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6333                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6334                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6335                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6336                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6337                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6338                 </fields>
6339                 <links>
6340                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6341                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6342                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6343                 </links>
6344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6345                         <actions>
6346                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6347                         </actions>
6348                 </permacrud>
6349         </class>
6350         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6351                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6352                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6353                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6354                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6355                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6356                 </fields>
6357                 <links>
6358                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6359                 </links>
6360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6361                         <actions>
6362                                 <retrieve permission="VIEW_USER">
6363                                         <context link="usr" field="home_ou" />
6364                                 </retrieve>
6365                         </actions>
6366                 </permacrud>
6367         </class>
6368     <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">
6369         <fields oils_persist:primary="field">
6370             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6371             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6372             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6373         </fields>
6374         <links/>
6375         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6376             <actions>
6377                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6378                 <retrieve />
6379                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6380                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6381             </actions>
6382         </permacrud>
6383     </class>
6384         <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">
6385                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6386                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6387                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6388                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6389                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6390                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6391                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6392                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6393                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6394                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6395                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6396                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6397                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6398                 </fields>
6399                 <links>
6400                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6401                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6402                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6403                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6404                 </links>
6405         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6406             <actions>
6407                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6408                 <retrieve />
6409                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6410                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6411             </actions>
6412         </permacrud>
6413         </class>
6414         <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">
6415                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6416                         <field name="field" reporter:datatype="link"/>
6417                         <field name="id" reporter:datatype="id" />
6418                         <field name="source" reporter:datatype="link"/>
6419                         <field name="value"  reporter:datatype="text"/>
6420                 </fields>
6421                 <links>
6422                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6423                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6424                 </links>
6425         </class>
6426         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6427                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6428                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6429                         <field name="btype" reporter:datatype="text"/>
6430                         <field name="id" reporter:datatype="id" />
6431                         <field name="name"  reporter:datatype="text"/>
6432                         <field name="description" reporter:datatype="text"/>
6433                         <field name="owner" reporter:datatype="link"/>
6434                         <field name="pub" reporter:datatype="bool"/>
6435                         <field name="create_time" reporter:datatype="timestamp" />
6436                 </fields>
6437                 <links>
6438                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6439                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6440                 </links>
6441         </class>
6442         <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">
6443                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6444                         <field name="id" reporter:datatype="id" />
6445                         <field name="bucket" reporter:datatype="link"/>
6446                         <field name="note" reporter:datatype="text" />
6447                 </fields>
6448                 <links>
6449                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6450                 </links>
6451         </class>
6452         <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">
6453                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6454                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6455                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6456                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6457                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6458                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6459                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6460                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6461                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6462                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6463                 </fields>
6464                 <links>
6465                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6466                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6467                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6468                 </links>
6469         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6470             <actions>
6471                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6472                     <context link="xact" jump="usr" field="home_ou"/>
6473                 </retrieve>
6474                         </actions>
6475                 </permacrud>
6476         </class>
6477         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6478                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6479                         <field name="id" reporter:datatype="id" />
6480                         <field name="ind1" />
6481                         <field name="ind2" />
6482                         <field name="record" />
6483                         <field name="subfield" />
6484                         <field name="tag" />
6485                         <field name="value" />
6486                 </fields>
6487                 <links>
6488                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6489                 </links>
6490         </class>
6491         <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">
6492                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6493                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6494                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6495                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6496                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6497                 </fields>
6498                 <links>
6499                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6500                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6501                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6502                 </links>
6503         </class>
6504         <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">
6505                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6506                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6507                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6508                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6509                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6510                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6511                 </fields>
6512                 <links>
6513                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6514                 </links>
6515         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6516             <actions>
6517                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6518                 <retrieve/>
6519                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6520                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6521             </actions>
6522         </permacrud>
6523
6524         </class>
6525         <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">
6526                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6527                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6528                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6529                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6530                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6531                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6532                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6533                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6534                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6535                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6536                 </fields>
6537                 <links>
6538                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6539                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6540                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6541                 </links>
6542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6543             <actions>
6544                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6545                 <retrieve/>
6546                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6547                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6548             </actions>
6549         </permacrud>
6550         </class>
6551         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6552                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6553                         <field name="create_date" reporter:datatype="timestamp"/>
6554                         <field name="creator" reporter:datatype="link"/>
6555                         <field name="edit_date" reporter:datatype="timestamp"/>
6556                         <field name="editor" reporter:datatype="link"/>
6557                         <field name="id" reporter:datatype="id" />
6558                         <field name="pub" reporter:datatype="bool"/>
6559                         <field name="record" reporter:datatype="link"/>
6560                         <field name="value"  reporter:datatype="text"/>
6561                 </fields>
6562                 <links>
6563                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6564                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6565                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6566                 </links>
6567         </class>
6568         <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">
6569                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6570                         <field name="balance_owed" reporter:datatype="money" />
6571                         <field name="total_owed" reporter:datatype="money" />
6572                         <field name="total_paid" reporter:datatype="money" />
6573                         <field name="usr" reporter:datatype="link"/>
6574                 </fields>
6575                 <links>
6576                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6577                 </links>
6578         </class>
6579     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6580                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6581                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6582                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6583                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6584                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6585                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6586                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6587                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6588                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6589                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6590                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6591                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6592                 </fields>
6593                 <links>
6594                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6595                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6596                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6597                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6598                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6599                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6600                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6601                 </links>
6602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6603             <actions>
6604                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
6605             </actions>
6606         </permacrud>
6607         </class>
6608         <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">
6609                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6610                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6611                         <field name="quality" reporter:datatype="int" />
6612                         <field name="source" reporter:datatype="text"/>
6613                         <field name="transcendant" reporter:datatype="bool"/>
6614                         <field name="can_have_copies" reporter:datatype="bool"/>
6615                 </fields>
6616                 <links/>
6617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6618             <actions>
6619                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6620                 <retrieve/>
6621                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6622                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6623             </actions>
6624         </permacrud>
6625         </class>
6626         <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">
6627                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6628                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6629                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6630                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6631                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6632                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6633                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6634                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6635                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6636                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6637                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6638                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6639                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6640                 </fields>
6641                 <links>
6642                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6643                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6644                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6645                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6646                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6647                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6648                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6649                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6650                 </links>
6651                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6652                         <actions>
6653                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6654                                         <context link="usr" field="home_ou" />
6655                                 </retrieve>
6656                         </actions>
6657                 </permacrud>
6658         </class>
6659         <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">
6660                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6661                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6662                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6663                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6664                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6665                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6666                 </fields>
6667                 <links>
6668                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6669                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6670                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6671                 </links>
6672         </class>
6673         <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">
6674                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6675                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6676                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6677                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6678                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6679                 </fields>
6680                 <links>
6681                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6682                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6683                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6684                 </links>
6685         </class>
6686         <class id="cubi" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
6687                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6688                         <field name="bucket" reporter:datatype="link"/>
6689                         <field name="id" reporter:datatype="id" />
6690                         <field name="target_user" reporter:datatype="link"/>
6691                         <field name="create_time" reporter:datatype="timestamp" />
6692                         <field name="pos" reporter:datatype="int" />
6693                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6694                 </fields>
6695                 <links>
6696                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6697                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6698             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6699                 </links>
6700         </class>
6701         <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">
6702                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6703                         <field name="id" reporter:datatype="id" />
6704                         <field name="item" reporter:datatype="link"/>
6705                         <field name="note" reporter:datatype="text" />
6706                 </fields>
6707                 <links>
6708                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6709                 </links>
6710         </class>
6711         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6712                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6713                         <field name="balance_owed" reporter:datatype="money" />
6714                         <field name="total_owed" reporter:datatype="money" />
6715                         <field name="total_paid" reporter:datatype="money" />
6716                         <field name="usr" reporter:datatype="link"/>
6717                 </fields>
6718                 <links>
6719                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6720                 </links>
6721         </class>
6722         <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">
6723                 <fields oils_persist:primary="code" oils_persist:sequence="">
6724                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6725                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6726                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6727                 </fields>
6728                 <links/>
6729         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6730             <actions>
6731                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6732                 <retrieve/>
6733                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6734                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6735             </actions>
6736         </permacrud>
6737         </class>
6738         <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">
6739                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6740                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6741                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6742                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6743                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6744                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6745                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6746                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6747                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6748                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6749                 </fields>
6750                 <links>
6751                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6752                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6753                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6754                 </links>
6755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6756             <actions>
6757                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6758                     <context link="xact" jump="usr" field="home_ou"/>
6759                 </retrieve>
6760                         </actions>
6761                 </permacrud>
6762         </class>
6763         <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">
6764                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6765                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6766                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6767                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6768                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6769                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6770                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6771                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6772                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6773                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6774                 </fields>
6775                 <links>
6776                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6777                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6778                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6779                 </links>
6780         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6781             <actions>
6782                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6783                     <context link="xact" jump="usr" field="home_ou"/>
6784                 </retrieve>
6785                         </actions>
6786                 </permacrud>
6787         </class>
6788         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6789                 <fields oils_persist:primary="id" oils_persist:sequence="">
6790                         <field name="checkin_lib" reporter:datatype="link"/>
6791                         <field name="checkin_staff" reporter:datatype="link"/>
6792                         <field name="checkin_time" reporter:datatype="timestamp"/>
6793                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6794                         <field name="circ_staff" reporter:datatype="link"/>
6795                         <field name="desk_renewal" reporter:datatype="bool"/>
6796                         <field name="due_date" reporter:datatype="timestamp"/>
6797                         <field name="duration" reporter:datatype="interval"/>
6798                         <field name="duration_rule" reporter:datatype="link"/>
6799                         <field name="fine_interval" reporter:datatype="interval"/>
6800                         <field name="id" reporter:datatype="id" />
6801                         <field name="max_fine" reporter:datatype="money" />
6802                         <field name="max_fine_rule" reporter:datatype="link"/>
6803                         <field name="opac_renewal" reporter:datatype="bool"/>
6804                         <field name="phone_renewal" reporter:datatype="bool"/>
6805                         <field name="recurring_fine" reporter:datatype="money" />
6806                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6807                         <field name="renewal_remaining" reporter:datatype="int" />
6808             <field name="grace_period" reporter:datatype="interval" />
6809                         <field name="stop_fines" reporter:datatype="text"/>
6810                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6811                         <field name="target_copy" reporter:datatype="link"/>
6812                         <field name="usr" reporter:datatype="link"/>
6813                         <field name="xact_finish" reporter:datatype="timestamp" />
6814                         <field name="xact_start" reporter:datatype="timestamp" />
6815                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6816                 </fields>
6817                 <links>
6818                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6819                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6820                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6821                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6822                 </links>
6823         </class>
6824         <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">
6825                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6826                         <field name="field" reporter:datatype="link"/>
6827                         <field name="id" reporter:datatype="id" />
6828                         <field name="source" reporter:datatype="link"/>
6829                         <field name="value" reporter:datatype="text"/>
6830                 </fields>
6831                 <links>
6832                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6833                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6834                 </links>
6835         </class>
6836         <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">
6837                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6838                         <field name="high" reporter:datatype="money" />
6839                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6840                         <field name="low" reporter:datatype="money" />
6841                         <field name="name" reporter:datatype="text"/>
6842                         <field name="normal" reporter:datatype="money" />
6843                         <field name="recurrence_interval" reporter:datatype="interval"/>
6844             <field name="grace_period" reporter:datatype="interval" />
6845                 </fields>
6846                 <links/>
6847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6848             <actions>
6849                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6850                 <retrieve/>
6851                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6852                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6853             </actions>
6854         </permacrud>
6855         </class>
6856         <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">
6857                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6858                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6859                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6860                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6861                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6862                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6863                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6864                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6865                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6866                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6867                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6868                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6869                 </fields>
6870                 <links>
6871                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6872                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6873                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6874                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6875                 </links>
6876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6877             <actions>
6878                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6879                     <context link="xact" jump="usr" field="home_ou"/>
6880                 </retrieve>
6881                         </actions>
6882                 </permacrud>
6883         </class>
6884         <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">
6885                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6886                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6887                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6888                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6889                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6890                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6891                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6892                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6893                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6894                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6895                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6896                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6897                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6898                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6899                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6900                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6901                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6902                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6903                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6904                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6905                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6906                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6907                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6908                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6909                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6910                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6911                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6912                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6913                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6914                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6915                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6916                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6917                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6918                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6919                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6920                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6921                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6922                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6923                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6924                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6925                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6926                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6927                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6928                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6929                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6930                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6931                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6932                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6933                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6934                 </fields>
6935                 <links>
6936                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6937                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6938                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6939                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6940                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6941                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6942                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6943                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6944                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6945                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6946                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6947                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6948                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6949                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6950                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6951                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6952                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6953                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6954                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6955                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6956                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6957                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6958                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
6959                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
6960                 </links>
6961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6962             <actions>
6963                 <create permission="CREATE_COPY">
6964                     <context link="call_number" field="owning_lib"/>
6965                 </create>
6966                 <retrieve/>
6967                 <update permission="UPDATE_COPY">
6968                     <context link="call_number" field="owning_lib"/>
6969                 </update>
6970                 <delete permission="DELETE_COPY">
6971                     <context link="call_number" field="owning_lib"/>
6972                 </delete>
6973             </actions>
6974         </permacrud>
6975         </class>
6976
6977         <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">
6978                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6979                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6980                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
6981                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6982                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6983                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6984                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6985                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6986                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
6987                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6988                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6989                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6990                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6991                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
6992                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6993                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6994                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6995                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6996                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6997                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6998                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6999                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7000                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7001                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7002                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7003                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7004                 </fields>
7005                 <links>
7006                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7007                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7008                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7009                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7010                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7011                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7012                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7013                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7014                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7015                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7016                 </links>
7017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7018                         <actions>
7019                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7020                                 <retrieve />
7021                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7022                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7023                         </actions>
7024                 </permacrud>
7025         </class>
7026
7027         <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">
7028                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7029                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7030                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7031                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7032                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7033                 </fields>
7034                 <links/>
7035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7036             <actions>
7037                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7038                 <retrieve/>
7039                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7040                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7041             </actions>
7042         </permacrud>
7043         </class>
7044         <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">
7045                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7046                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7047                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7048                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7049                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7050                 </fields>
7051                 <links/>
7052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7053             <actions>
7054                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7055                 <retrieve/>
7056                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7057                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7058             </actions>
7059         </permacrud>
7060         </class>
7061         <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">
7062                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7063                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7064                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7065                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7066                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7067                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7068                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7069                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7070                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7071                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7072                 </fields>
7073                 <links>
7074                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7075                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7076                 </links>
7077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7078             <actions>
7079                 <create permission="CREATE_PERM" global_required="true"/>
7080                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7081                 <update permission="UPDATE_PERM" global_required="true"/>
7082                 <delete permission="DELETE_PERM" global_required="true"/>
7083             </actions>
7084         </permacrud>
7085         </class>
7086         <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">
7087                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7088                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7089                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7090                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7091                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7092                 </fields>
7093                 <links>
7094                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7095                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7096                 </links>
7097         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7098             <actions>
7099                 <create permission="ADMIN_SURVEY">
7100                     <context link="question" jump="survey" field="owner"/>
7101                 </create>
7102                 <retrieve/>
7103                 <update permission="ADMIN_SURVEY">
7104                     <context link="question" jump="survey" field="owner"/>
7105                 </update>
7106                 <delete permission="ADMIN_SURVEY">
7107                     <context link="question" jump="survey" field="owner"/>
7108                 </delete>
7109             </actions>
7110         </permacrud>
7111         </class>
7112         <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">
7113                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7114                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7115                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7116                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7117                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7118                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7119                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7120                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7121                 </fields>
7122                 <links>
7123                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7124                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7125                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7126                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7127                 </links>
7128                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7129                         <actions>
7130                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7131                         </actions>
7132                 </permacrud>
7133         </class>
7134         <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">
7135                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7136                         <field name="balance_owed" reporter:datatype="money" />
7137                         <field name="total_owed" reporter:datatype="money" />
7138                         <field name="total_paid" reporter:datatype="money" />
7139                         <field name="usr" reporter:datatype="link"/>
7140                 </fields>
7141                 <links>
7142                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7143                 </links>
7144         </class>
7145         <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">
7146                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7147                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7148                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7149                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7150                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7151                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7152                 </fields>
7153                 <links>
7154                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7155                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7156                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7157                 </links>
7158         </class>
7159         <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">
7160                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7161                         <field name="field" reporter:datatype="link"/>
7162                         <field name="id" reporter:datatype="id" />
7163                         <field name="source" reporter:datatype="link"/>
7164                         <field name="value" reporter:datatype="text"/>
7165                 </fields>
7166                 <links>
7167                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7168                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7169                 </links>
7170         </class>
7171         <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">
7172                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7173                         <field name="field" reporter:datatype="link"/>
7174                         <field name="id" reporter:datatype="id" />
7175                         <field name="source" reporter:datatype="link"/>
7176                         <field name="value" reporter:datatype="text"/>
7177                 </fields>
7178                 <links>
7179                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7180                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7181                 </links>
7182         </class>
7183         <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">
7184                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7185                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7186                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7187                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7188                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7189                 </fields>
7190                 <links>
7191                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7192                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7193                 </links>
7194         </class>
7195         <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">
7196                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7197                         <field name="depth" reporter:datatype="int" />
7198                         <field name="grantable" reporter:datatype="bool"/>
7199                         <field name="grp" reporter:datatype="link"/>
7200                         <field name="id" reporter:datatype="id" />
7201                         <field name="perm" reporter:datatype="link"/>
7202                 </fields>
7203                 <links>
7204                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7205                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7206                 </links>
7207         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7208             <actions>
7209                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7210                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7211                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7212                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7213             </actions>
7214         </permacrud>
7215         </class>
7216         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7217                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7218                         <field name="items" oils_persist:virtual="true" />
7219                         <field name="btype" reporter:datatype="text"/>
7220                         <field name="id" reporter:datatype="id" />
7221                         <field name="name" reporter:datatype="text"/>
7222                         <field name="description" reporter:datatype="text"/>
7223                         <field name="owner" reporter:datatype="link"/>
7224                         <field name="pub" reporter:datatype="bool"/>
7225                         <field name="create_time" reporter:datatype="timestamp" />
7226                 </fields>
7227                 <links>
7228                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7229                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7230                 </links>
7231         </class>
7232         <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">
7233                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7234                         <field name="id" reporter:datatype="id" />
7235                         <field name="bucket" reporter:datatype="link"/>
7236                         <field name="note" reporter:datatype="text" />
7237                 </fields>
7238                 <links>
7239                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7240                 </links>
7241         </class>
7242         <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">
7243                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7244                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7245                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7246                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7247                 </fields>
7248                 <links>
7249                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7250                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7251                 </links>
7252         </class>
7253         <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">
7254                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7255                         <field name="depth" reporter:datatype="int"/>
7256                         <field name="grantable" reporter:datatype="bool"/>
7257                         <field name="id" reporter:datatype="id" />
7258                         <field name="perm" reporter:datatype="link"/>
7259                         <field name="usr" reporter:datatype="link"/>
7260                 </fields>
7261                 <links>
7262                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7263                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7264                 </links>
7265         </class>
7266         <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">
7267                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7268                         <field name="object_id" reporter:datatype="text"/>
7269                         <field name="grantable" reporter:datatype="bool"/>
7270                         <field name="id" reporter:datatype="id" />
7271                         <field name="perm" reporter:datatype="link"/>
7272                         <field name="usr" reporter:datatype="link"/>
7273                         <field name="object_type" reporter:datatype="text"/>
7274                 </fields>
7275                 <links>
7276                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7277                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7278                 </links>
7279         </class>
7280         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
7281                 <fields oils_persist:primary="id" oils_persist:sequence="">
7282                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7283                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7284                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7285                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7286                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7287                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7288                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7289                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7290                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7291                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7292                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7293                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7294                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7295                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7296                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7297                 </fields>
7298                 <links>
7299                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7300                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7301                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7302                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7303                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7304                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7305                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7306                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7307                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7308                 </links>
7309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7310             <actions>
7311                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7312                     <context link="xact" jump="usr" field="home_ou"/>
7313                 </retrieve>
7314                         </actions>
7315                 </permacrud>
7316         </class>
7317         <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
7318                 <fields oils_persist:primary="id" oils_persist:sequence="">
7319                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7320                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7321                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7322                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7323                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7324                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7325                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7326                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7327                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7328                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7329                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7330                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7331                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7332                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7333                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7334                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7335                 </fields>
7336                 <links>
7337                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7338                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7339                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7340                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7341                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7342                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7343                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7344                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7345                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7346                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7347                 </links>
7348         </class>
7349         <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">
7350                 <fields oils_persist:primary="id" oils_persist:sequence="">
7351                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7352                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7353                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7354                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7355                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7356                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7357                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7358                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7359                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7360                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7361                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7362                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7363                 </fields>
7364                 <links>
7365                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7366                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7367                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7368                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7369                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7370                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7371                 </links>
7372         </class>
7373         <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">
7374                 <fields oils_persist:primary="id" oils_persist:sequence="">
7375                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7376                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7377                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7378                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7379                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7380                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7381                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7382                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7383                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7384                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7385                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7386                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7387                 </fields>
7388                 <links>
7389                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7390                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7391                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7392                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7393                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7394                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7395                 </links>
7396         </class>
7397         <class id="cbrebi" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">
7398                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7399                         <field name="bucket" reporter:datatype="link"/>
7400                         <field name="id" reporter:datatype="id" />
7401                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7402                         <field name="create_time" reporter:datatype="timestamp" />
7403                         <field name="pos" reporter:datatype="int" />
7404                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7405                 </fields>
7406                 <links>
7407                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7408                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7409             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7410                 </links>
7411         </class>
7412         <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">
7413                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7414                         <field name="id" reporter:datatype="id" />
7415                         <field name="item" reporter:datatype="link"/>
7416                         <field name="note" reporter:datatype="text" />
7417                 </fields>
7418                 <links>
7419                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7420                 </links>
7421         </class>
7422         <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">
7423                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7424                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7425                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7426                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7427                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7428                 </fields>
7429                 <links>
7430                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7431                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7432                 </links>
7433                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7434                         <actions>
7435                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7436                         </actions>
7437                 </permacrud>
7438         </class>
7439     <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">
7440         <fields oils_persist:primary="field">
7441             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7442             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7443             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7444         </fields>
7445         <links/>
7446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7447             <actions>
7448                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7449                 <retrieve />
7450                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7451                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7452             </actions>
7453         </permacrud>
7454     </class>
7455         <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">
7456                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7457                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7458                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7459                 </fields>
7460                 <links/>
7461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7462             <actions>
7463                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7464                 <retrieve/>
7465                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7466                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7467             </actions>
7468         </permacrud>
7469         </class>
7470
7471
7472         <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">
7473                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7474                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7475                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7476                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7477                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7478                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7479                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7480                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7481                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7482                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7483                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7484                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7485                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7486                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7487                 </fields>
7488                 <links>
7489                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7490                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7491                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7492                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7493                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7494                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7495                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7496                 </links>
7497         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7498             <actions>
7499                 <create permission="TRANSIT_COPY">
7500                     <context link="target_copy" field="owner"/>
7501                 </create>
7502                 <retrieve/>
7503                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7504                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7505             </actions>
7506         </permacrud>
7507         </class>
7508         <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">
7509                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7510                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7511                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7512                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7513                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7514                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7515                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7516                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7517                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7518                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7519                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7520                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7521                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7522                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7523                 </fields>
7524                 <links>
7525                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7526                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7527                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7528                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7529                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7530                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7531                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7532                 </links>
7533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7534             <actions>
7535                 <create permission="TRANSIT_COPY" context_field="owner">
7536                     <context link="target_copy" field="circ_lib"/>
7537                 </create>
7538                 <retrieve/>
7539                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7540                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7541             </actions>
7542         </permacrud>
7543         </class>
7544         <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">
7545                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7546                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7547                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7548                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7549                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7550                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7551                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7552                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7553                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7554                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7555                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7556                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7557                 </fields>
7558                 <links>
7559                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7560                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7561                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7562                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7563                 </links>
7564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7565             <actions>
7566                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7567                     <context link="xact" jump="usr" field="home_ou"/>
7568                 </retrieve>
7569                         </actions>
7570                 </permacrud>
7571         </class>
7572         <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">
7573                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7574                         <field name="grp" />
7575                         <field name="id" reporter:datatype="id" />
7576                         <field name="usr" />
7577                 </fields>
7578                 <links>
7579                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7580                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7581                 </links>
7582         </class>
7583         <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">
7584                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7585                         <field name="id" reporter:datatype="id" />
7586                         <field name="fq_field" reporter:datatype="text"/>
7587                         <field name="identity_value" reporter:datatype="text"/>
7588                         <field name="translation" reporter:datatype="text"/>
7589                         <field name="string" reporter:datatype="text"/>
7590                 </fields>
7591                 <links>
7592                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7593                 </links>
7594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7595             <actions>
7596                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7597                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7598                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7599                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7600             </actions>
7601         </permacrud>
7602         </class>
7603         <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">
7604                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7605                         <field name="id" reporter:datatype="id" />
7606                         <field name="fm_class" reporter:datatype="text"/>
7607                         <field name="field" reporter:datatype="text"/>
7608                         <field name="owner" reporter:datatype="org_unit"/>
7609                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7610                 </fields>
7611                 <links>
7612                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7613                 </links>
7614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7615             <actions>
7616                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7617                 <retrieve/>
7618                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7619                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7620             </actions>
7621         </permacrud>
7622         </class>
7623         <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">
7624                 <fields oils_persist:primary="code">
7625                         <field name="code" reporter:datatype="id" />
7626                         <field name="marc_code" reporter:datatype="text"/>
7627                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7628                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7629                         <field name="rtl" reporter:datatype="bool"/>
7630                 </fields>
7631                 <links/>
7632         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7633             <actions>
7634                 <create permission="CREATE_LOCALE" global_required="true"/>
7635                 <retrieve/>
7636                 <update permission="UPDATE_LOCALE" global_required="true"/>
7637                 <delete permission="DELETE_LOCALE" global_required="true"/>
7638             </actions>
7639         </permacrud>
7640         </class>
7641         <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">
7642                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7643                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7644                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7645                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7646             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7647                 </fields>
7648                 <links>
7649                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7650                 </links>
7651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7652             <actions>
7653                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7654                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7655                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7656                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7657             </actions>
7658         </permacrud>
7659         </class>
7660
7661         <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">
7662                 <fields oils_persist:primary="id">
7663                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7664                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7665                 </fields>
7666                 <links/>
7667         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7668             <actions>
7669                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7670                 <retrieve/>
7671                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7672                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7673             </actions>
7674         </permacrud>
7675         </class>
7676
7677         <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">
7678                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7679                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7680                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7681                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7682                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7683                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7684                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7685                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7686                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7687                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7688                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7689                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7690                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7691                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7692                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7693                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7694                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7695                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7696                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7697                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7698                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7699                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7700                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7701                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7702                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7703                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7704                 </fields>
7705                 <links>
7706                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7707                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7708                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7709                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7710                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7711                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7712                 </links>
7713         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7714             <actions>
7715                 <create permission="user_request.create">
7716                     <context link="usr" field="home_ou"/>
7717                                 </create>
7718                 <retrieve permission="user_request.view">
7719                     <context link="usr" field="home_ou"/>
7720                                 </retrieve>
7721                 <update permission="user_request.update">
7722                     <context link="usr" field="home_ou"/>
7723                                 </update>
7724                 <delete permission="user_request.delete">
7725                     <context link="usr" field="home_ou"/>
7726                                 </delete>
7727             </actions>
7728         </permacrud>
7729         </class>
7730
7731         <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">
7732                 <fields oils_persist:primary="code">
7733                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7734                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7735                 </fields>
7736                 <links/>
7737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7738             <actions>
7739                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7740                 <retrieve/>
7741                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7742                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7743             </actions>
7744         </permacrud>
7745         </class>
7746
7747         <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">
7748                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7749                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7750                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7751                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7752                         <field reporter:label="Ratio" name="ratio" />
7753                 </fields>
7754                 <links>
7755                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7756                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7757                 </links>
7758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7759                         <actions>
7760                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7761                                 <retrieve/>
7762                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7763                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7764                         </actions>
7765                 </permacrud>
7766         </class>
7767
7768         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7769                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7770                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7771                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7772                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7773                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7774                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7775                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7776                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7777                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7778                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7779                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7780                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7781                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7782                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7783                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7784                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7785                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7786                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7787                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
7788                 </fields>
7789                 <links>
7790                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7791                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7792             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7793             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7794                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7795                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
7796                 </links>
7797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7798             <actions>
7799                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7800                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7801                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7802                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7803             </actions>
7804         </permacrud>
7805         </class>
7806
7807         <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">
7808                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7809                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7810                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7811                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7812                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7813                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7814                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7815                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7816                 </fields>
7817                 <links>
7818                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7819                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7820                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7821                 </links>
7822         </class>
7823
7824         <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">
7825                 <fields oils_persist:primary="code">
7826                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7827                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7828                 </fields>
7829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7830             <actions>
7831                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7832                 <retrieve/>
7833                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7834                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7835             </actions>
7836                 </permacrud>
7837         </class>
7838
7839         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7840                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7841                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7842                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7843                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7844                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7845                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7846                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7847                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7848                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7849                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7850                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7851                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7852                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7853                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7854                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7855                 </fields>
7856                 <links>
7857                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7858                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7859                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7860                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7861                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7862                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7863                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7864                 </links>
7865         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7866             <actions>
7867                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7868                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7869                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7870                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7871             </actions>
7872         </permacrud>
7873         </class>
7874
7875         <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">
7876                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7877                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7878                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7879                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7880                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7881                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7882                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7883                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7884                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7885                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7886                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7887                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7888                 </fields>
7889                 <links>
7890                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7891                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7892                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7893                 </links>
7894         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7895             <actions>
7896                 <create   permission="ADMIN_INVOICE">
7897                                         <context link="invoice" field="receiver"/>
7898                                 </create>
7899                 <retrieve permission="ADMIN_INVOICE">
7900                                         <context link="invoice" field="receiver"/>
7901                                 </retrieve>
7902                 <update   permission="ADMIN_INVOICE">
7903                                         <context link="invoice" field="receiver"/>
7904                                 </update>
7905                                 <delete   permission="ADMIN_INVOICE">
7906                                         <context link="invoice" field="receiver"/>
7907                                 </delete>
7908             </actions>
7909         </permacrud>
7910         </class>
7911
7912         <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">
7913                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7914                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7915                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7916                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7917                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7918                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7919                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7920                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7921                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7922                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7923                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7924                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7925                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7926                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7927                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7928                 </fields>
7929                 <links>
7930                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7931                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7932                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7933                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7934                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7935                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7936                 </links>
7937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7938             <actions>
7939                 <create   permission="ADMIN_INVOICE">
7940                                         <context link="invoice" field="receiver"/>
7941                                 </create>
7942                 <retrieve permission="ADMIN_INVOICE">
7943                                         <context link="invoice" field="receiver"/>
7944                                 </retrieve>
7945                 <update   permission="ADMIN_INVOICE">
7946                                         <context link="invoice" field="receiver"/>
7947                                 </update>
7948                                 <delete   permission="ADMIN_INVOICE">
7949                                         <context link="invoice" field="receiver"/>
7950                                 </delete>
7951             </actions>
7952         </permacrud>
7953         </class>
7954
7955         <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">
7956                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7957                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7958                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7959                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7960                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7961                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7962                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7963                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7964                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7965                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7966                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7967                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7968                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7969                 </fields>
7970                 <links>
7971                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7972                 </links>
7973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7974             <actions>
7975                 <create permission="ADMIN_PROVIDER">
7976                     <context link="provider" field="owner"/>
7977                 </create>
7978                 <retrieve permission="ADMIN_PROVIDER">
7979                     <context link="provider" field="owner"/>
7980                 </retrieve>
7981                 <update permission="ADMIN_PROVIDER">
7982                     <context link="provider" field="owner"/>
7983                 </update>
7984                 <delete permission="ADMIN_PROVIDER">
7985                     <context link="provider" field="owner"/>
7986                 </delete>
7987             </actions>
7988         </permacrud>
7989         </class>
7990
7991         <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">
7992                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7993                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7994                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7995                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7996                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7997                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7998                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7999         </fields>
8000                 <links>
8001                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8002                 </links>
8003         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8004             <actions>
8005                 <create permission="ADMIN_PROVIDER">
8006                     <context link="provider" field="owner"/>
8007                 </create>
8008                 <retrieve permission="ADMIN_PROVIDER">
8009                     <context link="provider" field="owner"/>
8010                 </retrieve>
8011                 <update permission="ADMIN_PROVIDER">
8012                     <context link="provider" field="owner"/>
8013                 </update>
8014                 <delete permission="ADMIN_PROVIDER">
8015                     <context link="provider" field="owner"/>
8016                 </delete>
8017             </actions>
8018         </permacrud>
8019     </class>
8020         <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">
8021                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8022                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8023                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8024                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8025                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8026                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8027                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8028                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8029                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8030                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8031                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8032                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8033                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8034                 </fields>
8035                 <links>
8036                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8037                 </links>
8038         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8039             <actions>
8040                 <create permission="ADMIN_PROVIDER">
8041                     <context link="contact" jump='provider' field="owner"/>
8042                 </create>
8043                 <retrieve permission="ADMIN_PROVIDER">
8044                     <context link="contact" jump='provider' field="owner"/>
8045                 </retrieve>
8046                 <update permission="ADMIN_PROVIDER">
8047                     <context link="contact" jump='provider' field="owner"/>
8048                 </update>
8049                 <delete permission="ADMIN_PROVIDER">
8050                     <context link="contact" jump='provider' field="owner"/>
8051                 </delete>
8052             </actions>
8053         </permacrud>
8054         </class>
8055
8056         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8057                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8058                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8059                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8060                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8061                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8062                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8063                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8064                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8065                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8066                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8067                 </fields>
8068                 <links>
8069                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8070                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8071                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8072                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8073                 </links>
8074         </class>
8075
8076         <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">
8077                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8078                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8079                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8080                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8081                 </fields>
8082                 <links>
8083             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8084                 </links>
8085                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8086                         <actions>
8087                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8088                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8089                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8090                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8091                         </actions>
8092                 </permacrud>
8093         </class>
8094
8095         <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">
8096                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8097                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8098                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8099                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8100                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8101                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8102                 </fields>
8103                 <links>
8104                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8105                 </links>
8106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8107                         <actions>
8108                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8109                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8110                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8111                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8112                         </actions>
8113                 </permacrud>
8114         </class>
8115
8116         <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">
8117                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8118                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8119                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8120                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8121                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8122                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8123                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8124                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8125                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8126                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8127                 </fields>
8128                 <links>
8129                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8130                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8131             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8132             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8133                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8134                 </links>
8135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8136             <actions>
8137                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8138                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8139                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8140                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8141             </actions>
8142         </permacrud>
8143         </class>
8144
8145         <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">
8146                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8147                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8148                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8149                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8150                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8151                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8152                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8153                 </fields>
8154                 <links>
8155                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8156                 </links>
8157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8158                         <actions>
8159                                 <create permission="ADMIN_FUNDING_SOURCE">
8160                     <context link="funding_source" field="owner"/>
8161                 </create>
8162                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8163                     <context link="funding_source" field="owner"/>
8164                 </retrieve>
8165                                 <update permission="ADMIN_FUNDING_SOURCE">
8166                     <context link="funding_source" field="owner"/>
8167                 </update>
8168                                 <delete permission="ADMIN_FUNDING_SOURCE">
8169                     <context link="funding_source" field="owner"/>
8170                 </delete>
8171                         </actions>
8172                 </permacrud>
8173         </class>
8174
8175         <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">
8176                 <fields oils_persist:primary="id">
8177                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8178                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8179                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8180                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8181                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8182                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8183                 </fields>
8184                 <links>
8185                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8186                 </links>
8187         </class>
8188
8189         <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">
8190                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8191                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8192                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8193                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8194                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8195                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8196                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8197                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8198                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8199                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8200                 </fields>
8201                 <links>
8202                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8203                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8204                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8205                 </links>
8206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8207                         <actions>
8208                                 <create permission="ADMIN_ACQ_FUND">
8209                     <context link="fund" field="org"/>
8210                 </create>
8211                                 <retrieve permission="ADMIN_ACQ_FUND">
8212                     <context link="fund" field="org"/>
8213                 </retrieve>
8214                                 <update permission="ADMIN_ACQ_FUND">
8215                     <context link="fund" field="org"/>
8216                 </update>
8217                                 <delete permission="ADMIN_ACQ_FUND">
8218                     <context link="fund" field="org"/>
8219                 </delete>
8220                         </actions>
8221                 </permacrud>
8222         </class>
8223
8224         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8225                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8226                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8227                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8228                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8229                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8230                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8231                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8232                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8233                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8234                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8235                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8236                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8237                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8238                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8239                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8240                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8241                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8242                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8243                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8244                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8245                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8246                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8247                 </fields>
8248                 <links>
8249                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8250                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8251             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8252             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8253             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8254             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8255             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8256             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8257             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8258             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8259             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8260                 </links>
8261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8262             <actions>
8263                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8264                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8265                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8266                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8267             </actions>
8268         </permacrud>
8269         </class>
8270
8271         <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">
8272                 <fields oils_persist:primary="fund">
8273                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8274                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8275                 </fields>
8276                 <links>
8277                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8278                 </links>
8279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8280             <actions>
8281                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8282                                         <context link="fund" field="org" />
8283                 </retrieve>
8284             </actions>
8285         </permacrud>
8286         </class>
8287
8288         <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">
8289                 <fields oils_persist:primary="fund">
8290                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8291                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8292                 </fields>
8293                 <links>
8294                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8295                 </links>
8296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8297             <actions>
8298                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8299                                         <context link="fund" field="org" />
8300                 </retrieve>
8301             </actions>
8302         </permacrud>
8303         </class>
8304
8305         <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">
8306                 <fields oils_persist:primary="fund">
8307                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8308                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8309                 </fields>
8310                 <links>
8311                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8312                 </links>
8313         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8314             <actions>
8315                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8316                                         <context link="fund" field="org" />
8317                 </retrieve>
8318             </actions>
8319         </permacrud>
8320         </class>
8321
8322         <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">
8323                 <fields oils_persist:primary="fund">
8324                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8325                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8326                 </fields>
8327                 <links>
8328                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8329                 </links>
8330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8331             <actions>
8332                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8333                                         <context link="fund" field="org" />
8334                 </retrieve>
8335             </actions>
8336         </permacrud>
8337         </class>
8338
8339         <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">
8340                 <fields oils_persist:primary="fund">
8341                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8342                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8343                 </fields>
8344                 <links>
8345                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8346                 </links>
8347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8348             <actions>
8349                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8350                                         <context link="fund" field="org" />
8351                 </retrieve>
8352             </actions>
8353         </permacrud>
8354         </class>
8355
8356    <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">
8357         <fields oils_persist:primary="fund">
8358             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8359             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8360         </fields>
8361         <links>
8362             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8363         </links>
8364     </class>
8365
8366    <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">
8367         <fields oils_persist:primary="fund">
8368             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8369             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8370         </fields>
8371         <links>
8372             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8373         </links>
8374     </class>
8375
8376    <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">
8377         <fields oils_persist:primary="fund">
8378             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8379             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8380         </fields>
8381         <links>
8382             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8383         </links>
8384     </class>
8385
8386    <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">
8387         <fields oils_persist:primary="fund">
8388             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8389             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8390         </fields>
8391         <links>
8392             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8393         </links>
8394     </class>
8395
8396    <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">
8397         <fields oils_persist:primary="fund">
8398             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8399             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8400         </fields>
8401         <links>
8402             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8403         </links>
8404     </class>
8405
8406         <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">
8407                 <fields oils_persist:primary="funding_source">
8408                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8409                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8410                 </fields>
8411                 <links>
8412                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8413                 </links>
8414         </class>
8415
8416         <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">
8417                 <fields oils_persist:primary="funding_source">
8418                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8419                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8420                 </fields>
8421                 <links>
8422                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8423                 </links>
8424         </class>
8425
8426         <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">
8427                 <fields oils_persist:primary="funding_source">
8428                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8429                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8430                 </fields>
8431                 <links>
8432                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8433                 </links>
8434         </class>
8435
8436         <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">
8437                 <fields oils_persist:primary="fund">
8438                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8439                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8440                 </fields>
8441                 <links>
8442                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8443                 </links>
8444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8445             <actions>
8446                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8447                                         <context link="fund" field="org" />
8448                 </retrieve>
8449             </actions>
8450         </permacrud>
8451     </class>
8452     <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">
8453         <oils_persist:source_definition><![CDATA[
8454             SELECT
8455                 acqf.*,
8456                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8457                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8458                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8459                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8460             FROM
8461                 acq.fund acqf
8462                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8463                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8464                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8465                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8466         ]]></oils_persist:source_definition>
8467         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8468             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8469             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8470             <field reporter:label="Name" name="name" reporter:datatype="text" />
8471             <field reporter:label="Year" name="year" reporter:datatype="int" />
8472             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8473             <field reporter:label="Code" name="code" reporter:datatype="text" />
8474             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8475             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8476             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8477             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8478             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8479
8480             <!-- non fund-native fields -->
8481             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8482             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8483             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8484             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8485         </fields>
8486         <links>
8487             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8488             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8489             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8490         </links>
8491         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8492             <actions>
8493                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8494             </actions>
8495         </permacrud>
8496         </class>
8497         <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">
8498                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8499                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8500                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8501                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8502                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8503                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8504                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8505                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8506                 </fields>
8507                 <links>
8508                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8509                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8510                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8511                 </links>
8512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8513                         <actions>
8514                                 <create permission="ADMIN_ACQ_FUND">
8515                     <context link="fund" field="org"/>
8516                 </create>
8517                                 <retrieve permission="ADMIN_ACQ_FUND">
8518                     <context link="fund" field="org"/>
8519                 </retrieve>
8520                                 <update permission="ADMIN_ACQ_FUND">
8521                     <context link="fund" field="org"/>
8522                 </update>
8523                                 <delete permission="ADMIN_ACQ_FUND">
8524                     <context link="fund" field="org"/>
8525                 </delete>
8526                         </actions>
8527                 </permacrud>
8528         </class>
8529
8530     <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">
8531         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8532             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8533             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8534             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8535             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8536             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8537             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8538             <field reporter:label="Note" name="note" reporter:datatype="text" />
8539             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8540         </fields>
8541         <links>
8542             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8543             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8544             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8545         </links>
8546                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8547                         <actions>
8548                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8549                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8550                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8551                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8552                         </actions>
8553                 </permacrud>
8554     </class>
8555
8556         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8557                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8558                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8559                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8560                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8561                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8562                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8563                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8564                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8565                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8566                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8567                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8568                 </fields>
8569                 <links>
8570                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8571                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8572                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8573                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8574                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8575                 </links>
8576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8577                         <actions>
8578                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8579                         </actions>
8580                 </permacrud>
8581         </class>
8582
8583         <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">
8584                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8585                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8586                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8587                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8588                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8589                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8590                 </fields>
8591                 <links>
8592                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8593                 </links>
8594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8595                         <actions>
8596                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8597                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8598                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8599                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8600                         </actions>
8601                 </permacrud>
8602         </class>
8603
8604         <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">
8605                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8606                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8607                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8608                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8609                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8610                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8611                         <field reporter:label="State" name="state" reporter:datatype="text" />
8612                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8613                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8614                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8615                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8616                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8617                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8618                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8619                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8620                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8621                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8622                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8623                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8624                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8625                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8626                 </fields>
8627                 <links>
8628                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8629                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8630                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8631                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8632                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8633                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8634                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8635                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8636                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8637                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8638                 </links>
8639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8640                         <actions>
8641                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8642                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8643                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8644                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8645                         </actions>
8646                 </permacrud>
8647         </class>
8648
8649         <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">
8650                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8651                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8652                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8653                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8654                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8655                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8656                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8657                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8658                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8659                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8660                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8661                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8662                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8663                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8664                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8665                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8666                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8667                 </fields>
8668                 <links>
8669                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8670                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8671                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8672                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8673                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8674                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8675                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8676                 </links>
8677                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8678             <actions>
8679                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8680             </actions>
8681                 </permacrud>
8682         </class>
8683
8684         <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">
8685                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8686                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8687                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8688                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8689                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8690                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8691                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8692                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8693                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8694                 </fields>
8695                 <links>
8696                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8697                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8698                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8699                 </links>
8700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8701             <actions>
8702                 <create permission="CREATE_PURCHASE_ORDER">
8703                     <context link="purchase_order" field="ordering_agency"/>
8704                 </create>
8705                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8706                     <context link="purchase_order" field="ordering_agency"/>
8707                 </retrieve>
8708                 <update permission="CREATE_PURCHASE_ORDER">
8709                     <context link="purchase_order" field="ordering_agency"/>
8710                 </update>
8711                 <delete permission="CREATE_PURCHASE_ORDER">
8712                     <context link="purchase_order" field="ordering_agency"/>
8713                 </delete>
8714             </actions>
8715                 </permacrud>
8716         </class>
8717
8718         <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">
8719                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8720                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8721                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8722                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8723                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8724                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8725                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8726                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8727                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8728                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8729                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8730                 </fields>
8731                 <links>
8732                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8733                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8734                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8735                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8736                 </links>
8737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8738             <actions>
8739                 <create permission="CREATE_PURCHASE_ORDER">
8740                     <context link="purchase_order" field="ordering_agency"/>
8741                 </create>
8742                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8743                     <context link="purchase_order" field="ordering_agency"/>
8744                 </retrieve>
8745                 <update permission="CREATE_PURCHASE_ORDER">
8746                     <context link="purchase_order" field="ordering_agency"/>
8747                 </update>
8748                 <delete permission="CREATE_PURCHASE_ORDER">
8749                     <context link="purchase_order" field="ordering_agency"/>
8750                 </delete>
8751             </actions>
8752                 </permacrud>
8753         </class>
8754
8755         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8756                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8757                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8758                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8759                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8760                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8761                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8762                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8763                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8764                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8765                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8766                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8767                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8768                         <field reporter:label="State" name="state" reporter:datatype="text" />
8769                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8770                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8771                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8772                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8773                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8774                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8775                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8776                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8777                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8778                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8779                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8780                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8781                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8782                 </fields>
8783                 <links>
8784                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8785                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8786                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8787                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8788                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8789                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8790                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8791                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8792                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8793                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8794                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8795                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8796                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8797                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8798                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8799                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8800                 </links>
8801                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8802                         <actions>
8803                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8804                                         <context link="purchase_order" field="ordering_agency"/>
8805                                         <context link="picklist" field="org_unit"/>
8806                                 </retrieve>
8807                         </actions>
8808                 </permacrud>
8809         </class>
8810
8811         <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">
8812                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8813                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8814                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8815                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8816                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8817                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8818                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8819                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8820                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8821                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8822                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8823                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8824                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8825                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8826                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8827                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8828                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8829                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8830                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8831                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8832                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8833                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8834                 </fields>
8835                 <links>
8836                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8837                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8838                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8839                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8840                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8841                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8842                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8843                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8844                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8845                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8846                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8847                 </links>
8848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8849                         <actions>
8850                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8851                                         <context link="purchase_order" field="ordering_agency"/>
8852                                         <context link="picklist" field="org_unit"/>
8853                                 </retrieve>
8854                         </actions>
8855                 </permacrud>
8856         </class>
8857
8858         <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">
8859                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8860                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8861                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8862                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8863                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8864                 </fields>
8865                 <links>
8866                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8867                 </links>
8868                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8869                         <actions>
8870                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8871                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8872                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8873                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8874                         </actions>
8875                 </permacrud>
8876         </class>
8877
8878         <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">
8879                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8880                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8881                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8882                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8883                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8884                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8885                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8886                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8887                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8888                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8889                 </fields>
8890                 <links>
8891                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8892                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8893                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8894                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8895                 </links>
8896         </class>
8897
8898         <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">
8899                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8900                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8901                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8902                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8903                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8904                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8905                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8906                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8907                 </fields>
8908                 <links>
8909                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8910                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8911                 </links>
8912         </class>
8913
8914         <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">
8915                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8916                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8917                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8918                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8919                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8920                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8921                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8922                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8923                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8924                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8925                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8926                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8927                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8928                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8929                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8930                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8931                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8932                 </fields>
8933                 <links>
8934                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8935                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8936                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8937                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8938                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8939                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8940                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8941                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8942                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8943                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8944                 </links>
8945         </class>
8946
8947         <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">
8948                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8949                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8950                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8951                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8952                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8953                 </fields>
8954                 <links/>
8955                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8956                         <actions>
8957                                 <retrieve />
8958                         </actions>
8959                 </permacrud>
8960         </class>
8961
8962         <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">
8963                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8964                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8965                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8966                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8967                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8968                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8969             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8970                 </fields>
8971                 <links/>
8972         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8973             <actions>
8974                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8975                 <retrieve />
8976                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8977                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8978             </actions>
8979         </permacrud>
8980         </class>
8981
8982         <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">
8983                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8984                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8985                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8986                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8987                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8988                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8989                 </fields>
8990                 <links/>
8991         </class>
8992         <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">
8993                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8994                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8995                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8996                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8997                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8998                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8999                 </fields>
9000                 <links>
9001                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9002                 </links>
9003         </class>
9004
9005         <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">
9006             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9007                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9008                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9009                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9010                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9011                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9012                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9013         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9014
9015             </fields>
9016             <links>
9017                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9018             </links>
9019             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9020                 <actions>
9021                     <create permission="ADMIN_PROVIDER">
9022                         <context link="provider" field="owner"/>
9023                     </create>
9024                     <retrieve permission="ADMIN_PROVIDER">
9025                         <context link="provider" field="owner"/>
9026                     </retrieve>
9027                     <update permission="ADMIN_PROVIDER">
9028                         <context link="provider" field="owner"/>
9029                     </update>
9030                     <delete permission="ADMIN_PROVIDER">
9031                         <context link="provider" field="owner"/>
9032                     </delete>
9033                 </actions>
9034             </permacrud>
9035         </class>
9036         
9037         <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">
9038             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9039                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9040                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9041                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9042                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9043             </fields>
9044             <links>
9045                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9046             </links>
9047             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9048                 <actions>
9049                     <create permission="ADMIN_PROVIDER">
9050                         <context link="provider" field="owner"/>
9051                     </create>
9052                     <retrieve permission="ADMIN_PROVIDER">
9053                         <context link="provider" field="owner"/>
9054                     </retrieve>
9055                     <update permission="ADMIN_PROVIDER">
9056                         <context link="provider" field="owner"/>
9057                     </update>
9058                     <delete permission="ADMIN_PROVIDER">
9059                         <context link="provider" field="owner"/>
9060                     </delete>
9061                 </actions>
9062             </permacrud>
9063         </class>
9064         
9065         <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">
9066             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9067                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9068                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9069                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9070                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9071                 </fields>
9072                 <links/>
9073         </class>
9074
9075         <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">
9076                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9077                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9078                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9079                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9080                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9081                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9082                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9083                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9084                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9085                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9086                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9087                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9088                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9089                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9090                 </fields>
9091                 <links>
9092                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9093                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9094                 </links>
9095         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9096             <actions>
9097                 <create permission="ADMIN_PROVIDER">
9098                     <context link="provider" field="owner"/>
9099                 </create>
9100                 <retrieve permission="ADMIN_PROVIDER">
9101                     <context link="provider" field="owner"/>
9102                 </retrieve>
9103                 <update permission="ADMIN_PROVIDER">
9104                     <context link="provider" field="owner"/>
9105                 </update>
9106                 <delete permission="ADMIN_PROVIDER">
9107                     <context link="provider" field="owner"/>
9108                 </delete>
9109             </actions>
9110         </permacrud>
9111         </class>
9112
9113         <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">
9114                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9115                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9116                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9117                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9118                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9119                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9120                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9121                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9122                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9123                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9124                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9125                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9126                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9127                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9128                 </fields>
9129                 <links>
9130                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9131                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9132                 </links>
9133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9134             <actions>
9135                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9136                     <context link="account" jump="provider" field="owner"/>
9137                 </retrieve>
9138                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9139                     <context link="account" jump="provider" field="owner"/>
9140                 </update>
9141                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9142                     <context link="account" jump="provider" field="owner"/>
9143                 </delete>
9144             </actions>
9145         </permacrud>
9146         </class>
9147
9148
9149         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9150                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9151                         <field name="id" reporter:datatype="id" />
9152                         <field name="parent" reporter:datatype="link"/>
9153                         <field name="owner" reporter:datatype="link"/>
9154                         <field name="create_time" reporter:datatype="timestamp"/>
9155                         <field name="name" reporter:datatype="text"/>
9156                         <field name="shared" reporter:datatype="bool"/>
9157                         <field name="share_with" reporter:datatype="link"/>
9158                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9159                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9160                 </fields>
9161                 <links>
9162                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9163                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9164                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9165                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9166                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9167                 </links>
9168         </class>
9169         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9170                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9171                         <field name="id" reporter:datatype="id" />
9172                         <field name="parent" reporter:datatype="link"/>
9173                         <field name="owner" reporter:datatype="link"/>
9174                         <field name="create_time" reporter:datatype="timestamp"/>
9175                         <field name="name" reporter:datatype="text"/>
9176                         <field name="shared" reporter:datatype="bool"/>
9177                         <field name="share_with" reporter:datatype="link"/>
9178                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9179                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9180                 </fields>
9181                 <links>
9182                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9183                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9184                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9185                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9186                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9187                 </links>
9188         </class>
9189         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9190                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9191                         <field name="id" reporter:datatype="id" />
9192                         <field name="parent" reporter:datatype="link"/>
9193                         <field name="owner" reporter:datatype="link"/>
9194                         <field name="create_time" reporter:datatype="timestamp"/>
9195                         <field name="name" reporter:datatype="text"/>
9196                         <field name="shared" reporter:datatype="bool"/>
9197                         <field name="share_with" reporter:datatype="link"/>
9198                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9199                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9200                 </fields>
9201                 <links>
9202                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9203                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9204                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9205                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9206                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9207                 </links>
9208         </class>
9209         <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">
9210                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9211                         <field name="id" reporter:datatype="id" />
9212                         <field name="owner" reporter:datatype="link"/>
9213                         <field name="create_time" reporter:datatype="timestamp"/>
9214                         <field name="name" reporter:datatype="text"/>
9215                         <field name="data" reporter:datatype="text"/>
9216                         <field name="folder" reporter:datatype="link"/>
9217                         <field name="description" reporter:datatype="text"/>
9218                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9219                 </fields>
9220                 <links>
9221                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9222                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9223                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9224                 </links>
9225         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9226             <actions>
9227                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9228                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9229                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9230                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9231             </actions>
9232         </permacrud>
9233         </class>
9234         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9235                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9236                         <field name="id" reporter:datatype="id" />
9237                         <field name="owner" reporter:datatype="link"/>
9238                         <field name="create_time" reporter:datatype="timestamp"/>
9239                         <field name="template" reporter:datatype="link"/>
9240                         <field name="data" reporter:datatype="text"/>
9241                         <field name="folder" reporter:datatype="link"/>
9242                         <field name="recur" reporter:datatype="bool"/>
9243                         <field name="recurrence" reporter:datatype="interval"/>
9244                         <field name="name" reporter:datatype="text"/>
9245                         <field name="description" reporter:datatype="text"/>
9246                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9247                 </fields>
9248                 <links>
9249                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9250                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9251                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9252                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9253                 </links>
9254         </class>
9255         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9256                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9257                         <field name="id" reporter:datatype="id" />
9258                         <field name="runner" reporter:datatype="link"/>
9259                         <field name="start_time" reporter:datatype="timestamp"/>
9260                         <field name="complete_time" reporter:datatype="timestamp"/>
9261                         <field name="run_time" reporter:datatype="timestamp"/>
9262                         <field name="email" reporter:datatype="text"/>
9263                         <field name="excel_format" reporter:datatype="bool"/>
9264                         <field name="csv_format" reporter:datatype="bool"/>
9265                         <field name="html_format" reporter:datatype="bool"/>
9266                         <field name="error_code" reporter:datatype="int"/>
9267                         <field name="error_text" reporter:datatype="text"/>
9268                         <field name="report" reporter:datatype="link"/>
9269                         <field name="folder" reporter:datatype="link"/>
9270                         <field name="chart_pie" reporter:datatype="bool"/>
9271                         <field name="chart_bar" reporter:datatype="bool"/>
9272                         <field name="chart_line" reporter:datatype="bool"/>
9273                 </fields>
9274                 <links>
9275                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9276                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9277                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9278                 </links>
9279         </class>
9280         <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">
9281                 <fields oils_persist:primary="id">
9282                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9283                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9284                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9285                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9286                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9287                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9288                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9289                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9290                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9291                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9292                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9293                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9294                 </fields>
9295                 <links>
9296                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9297                 </links>
9298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9299                         <actions>
9300                                 <retrieve />
9301                         </actions>
9302                 </permacrud>
9303         </class>
9304         <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">
9305                 <fields oils_persist:primary="id">
9306                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9307                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9308                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9309                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9310                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9311                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9312                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9313                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9314                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9315                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9316                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9317                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9318                 </fields>
9319                 <links>
9320                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9321                 </links>
9322         </class>
9323         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9324                 <fields oils_persist:primary="id">
9325                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9326                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9327                         <field reporter:label="Fingerprint" name="fingerprint" />
9328                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9329                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9330                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9331                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9332                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9333                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9334                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9335                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9336                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9337                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9338                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9339                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9340                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9341                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9342                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9343                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9344                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9345                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9346                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9347                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9348                 </fields>
9349                 <links>
9350                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9351                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9352                 </links>
9353         </class>
9354         <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">
9355                 <fields oils_persist:primary="id">
9356                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9357                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9358                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9359                 </fields>
9360                 <links>
9361                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9362                 </links>
9363         </class>
9364         <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">
9365                 <fields oils_persist:primary="id">
9366                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9367                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9368                 </fields>
9369                 <links>
9370                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9371                 </links>
9372         </class>
9373         <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">
9374                 <fields oils_persist:primary="id">
9375                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9376                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9377                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9378                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9379                 </fields>
9380                 <links>
9381                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9382                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9383                 </links>
9384         </class>
9385         <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">
9386                 <fields oils_persist:primary="xact">
9387                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9388                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9389                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9390                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9391                 </fields>
9392                 <links>
9393                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9394                 </links>
9395         </class>
9396         <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">
9397                 <fields oils_persist:primary="xact">
9398                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9399                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9400                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9401                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9402                 </fields>
9403                 <links>
9404                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9405                 </links>
9406         </class>
9407         <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)">
9408                 <fields oils_persist:primary="id">
9409                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9410                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9411                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9412                 </fields>
9413                 <links>
9414                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9415                 </links>
9416         </class>
9417         <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">
9418                 <fields oils_persist:primary="id">
9419                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9420                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9421                 </fields>
9422                 <links>
9423                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9424                 </links>
9425         </class>
9426         <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">
9427                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9428                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9429                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9430                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9431                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9432                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9433                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9434                 </fields>
9435                 <links>
9436                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9437                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9438                 </links>
9439                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9440                         <actions>
9441                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9442                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9443                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9444                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9445                         </actions>
9446                 </permacrud>
9447         </class>
9448         <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">
9449                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9450                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9451                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9452                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9453                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9454                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9455                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9456                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9457                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9458                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9459                 </fields>
9460                 <links>
9461                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9462                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9463                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9464                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9465                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9466                 </links>
9467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9468                         <actions>
9469                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9470                                         <context link="formula" field="owner"/>
9471                                 </create>
9472                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9473                                         <context link="formula" field="owner"/>
9474                                 </retrieve>
9475                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9476                                         <context link="formula" field="owner"/>
9477                                 </update>
9478                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9479                                         <context link="formula" field="owner"/>
9480                                 </delete>
9481                         </actions>
9482                 </permacrud>
9483         </class>
9484
9485         <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">
9486                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9487                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9488                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9489                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9490                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9491                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9492                 </fields>
9493                 <links>
9494                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9495                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9496                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9497                 </links>
9498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9499                         <actions>
9500                                 <create permission="CREATE_PURCHASE_ORDER">
9501                                         <context link="formula" field="owner"/>
9502                 </create>
9503                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9504                                         <context link="formula" field="owner"/>
9505                 </retrieve>
9506                                 <update permission="CREATE_PURCHASE_ORDER">
9507                                         <context link="formula" field="owner"/>
9508                 </update>
9509                                 <delete permission="CREATE_PURCHASE_ORDER">
9510                                         <context link="formula" field="owner"/>
9511                 </delete>
9512                         </actions>
9513                 </permacrud>
9514         </class>
9515
9516         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9517                 <fields oils_persist:primary="id">
9518                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9519                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9520                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9521                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9522                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9523                 </fields>
9524                 <links>
9525                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9526                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9527                 </links>
9528         </class>
9529
9530         <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">
9531                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9532                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9533                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9534                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9535                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9536                 </fields>
9537                 <links>
9538                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9539                 </links>
9540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9541                         <actions>
9542                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9543                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9544                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9545                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9546                         </actions>
9547                 </permacrud>
9548         </class>
9549
9550         <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">
9551                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9552                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9553                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9554                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9555                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9556                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9557                 </fields>
9558                 <links>
9559                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9560                 </links>
9561                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9562                         <actions>
9563                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9564                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9565                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9566                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9567                         </actions>
9568                 </permacrud>
9569         </class>
9570
9571         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9572                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9573                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9574                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9575                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9576                 </fields>
9577                 <links>
9578                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9579                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9580                 </links>
9581         </class>
9582
9583         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9584                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9585                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9586                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9587                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9588                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9589                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9590                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9591                 </fields>
9592                 <links>
9593                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9594                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9595                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9596                 </links>
9597         </class>
9598
9599         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9600                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9601                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9602                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9603                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9604                 </fields>
9605                 <links>
9606                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9607                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9608                 </links>
9609         </class>
9610
9611         <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">
9612                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9613                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9614                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9615                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9616                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9617                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9618                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9619                 </fields>
9620                 <links>
9621                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9622                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9623                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9624                 </links>
9625         </class>
9626
9627         <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">
9628                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9629                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9630                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9631                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9632                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9633                 </fields>
9634                 <links>
9635                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9636                 </links>
9637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9638             <actions>
9639                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9640                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9641                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9642                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9643             </actions>
9644                 </permacrud>
9645         </class>
9646
9647         <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">
9648                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9649                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9650                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9651                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9652                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9653                 </fields>
9654                 <links>
9655                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9656                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9657                 </links>
9658                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9659                         <actions>
9660                                 <create permission="ADMIN_CLAIM_POLICY">
9661                                         <context link="claim_policy" field="org_unit"/>
9662                 </create>
9663                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9664                                         <context link="claim_policy" field="org_unit"/>
9665                 </retrieve>
9666                                 <update permission="ADMIN_CLAIM_POLICY">
9667                                         <context link="claim_policy" field="org_unit"/>
9668                 </update>
9669                                 <delete permission="ADMIN_CLAIM_POLICY">
9670                                         <context link="claim_policy" field="org_unit"/>
9671                 </delete>
9672                         </actions>
9673                 </permacrud>
9674         </class>
9675
9676     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9677         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9678             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9679             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9680             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9681             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9682             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9683             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9684             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9685             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9686             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9687             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9688             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9689             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9690             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9691             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9692             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9693             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9694         </fields>
9695         <links>
9696             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9697         </links>
9698     </class>
9699
9700     <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">
9701         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9702             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9703             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9704             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9705             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9706             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9707         </fields>
9708     </class>
9709
9710     <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">
9711         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9712             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9713             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9714             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9715             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9716             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9717             <field reporter:label="City" name="city" reporter:datatype="text"/>
9718             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9719             <field reporter:label="State" name="state" reporter:datatype="text"/>
9720             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9721             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9722             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9723         </fields>
9724     </class>
9725
9726     <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">
9727         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9728             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9729             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9730             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9731             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9732             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9733             <field reporter:label="City" name="city" reporter:datatype="text"/>
9734             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9735             <field reporter:label="State" name="state" reporter:datatype="text"/>
9736             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9737             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9738             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9739         </fields>
9740     </class>
9741
9742     <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">
9743         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9744             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9745             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9746             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9747             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9748             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9749             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9750         </fields>
9751     </class>
9752
9753     <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">
9754         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
9755             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9756             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9757             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9758             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
9759             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
9760             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9761         </fields>
9762     </class>
9763
9764         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9765                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9766                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9767                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9768                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9769                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9770                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9771                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9772                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9773                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9774                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9775                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9776                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9777                 </fields>
9778                 <links>
9779                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9780                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9781                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9782                 </links>
9783         </class>
9784
9785         <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
9786                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9787                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9788                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9789                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9790                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9791                 </fields>
9792                 <links>
9793                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9794                 </links>
9795         </class>
9796
9797     <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">
9798         <fields>
9799             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9800             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9801             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9802         </fields>
9803                 <links>
9804                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9805                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9806                 </links>
9807     </class>
9808
9809     <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">
9810         <fields>
9811             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9812             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9813         </fields>
9814                 <links>
9815                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9816                 </links>
9817     </class>
9818
9819     <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">
9820         <fields>
9821             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9822             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9823             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9824         </fields>
9825                 <links>
9826                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9827                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9828                 </links>
9829     </class>
9830
9831     <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">
9832         <fields>
9833             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9834             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9835         </fields>
9836                 <links>
9837                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9838                 </links>
9839     </class>
9840
9841     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9842                 <oils_persist:source_definition>
9843
9844             SELECT  DISTINCT l.*
9845               FROM  action.unfulfilled_hold_loops l
9846                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9847               WHERE l.count = m.max
9848
9849                 </oils_persist:source_definition>
9850         <fields>
9851             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9852             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9853             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9854         </fields>
9855                 <links>
9856                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9857                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9858                 </links>
9859     </class>
9860
9861         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9862                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9863                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9864                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9865                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9866                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9867                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9868                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9869                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9870                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9871                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9872                 </fields>
9873                 <links>
9874                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9875                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9876                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9877                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9878                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9879                 </links>
9880         </class>
9881
9882         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9883                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9884                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9885                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9886                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9887                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9888                 </fields>
9889                 <links>
9890                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9891                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9892                 </links>
9893         </class>
9894
9895         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9896                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9897                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9898                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9899                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9900                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9901                 </fields>
9902                 <links>
9903                 </links>
9904         </class>
9905
9906         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9907                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9908                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9909                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9910                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9911                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9912                 </fields>
9913                 <links>
9914                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9915                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9916                 </links>
9917         </class>
9918         
9919         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9920                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9921                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9922                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9923                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9924                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9925                 </fields>
9926                 <links>
9927                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9928                 </links>
9929         </class>
9930         
9931         <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">
9932                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9933                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9934                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9935                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9936                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9937                 </fields>
9938                 <links>
9939                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9940                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9941                 </links>
9942         </class>
9943
9944         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9945                 <fields oils_persist:primary="name">
9946                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9947                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9948                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9949                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9950                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9951                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9952                 </fields>
9953                 <links>
9954                 </links>
9955         </class>
9956
9957         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9958                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9959                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9960                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9961                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9962                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9963                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9964                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9965                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9966                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9967                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9968                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9969                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9970                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9971                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9972                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9973                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9974                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9975                 </fields>
9976                 <links>
9977                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9978                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9979                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9980                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9981                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9982                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9983                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9984                 </links>
9985         </class>
9986
9987         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9988                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9989                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9990                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9991                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9992                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9993                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9994                 </fields>
9995                 <links>
9996                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9997                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9998                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9999                 </links>
10000         </class>
10001
10002         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10003                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10004                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10005                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10006                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10007                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10008                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10009                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10010                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10011                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10012                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10013                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10014                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10015                 </fields>
10016                 <links>
10017                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10018                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10019                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10020                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10021                 </links>
10022         </class>
10023
10024         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10025                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10026                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10027                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10028                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10029                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10030                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10031                 </fields>
10032                 <links>
10033                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10034                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10035                 </links>
10036         </class>
10037
10038         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10039                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10040                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10041                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10042                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10043                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10044                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10045                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10046                 </fields>
10047                 <links>
10048                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10049                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10050                 </links>
10051         </class>
10052
10053         <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">
10054                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10055                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10056                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10057                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10058                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10059                 </fields>
10060                 <links>
10061                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10062                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10063                 </links>
10064         </class>
10065
10066         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10067                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10068                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10069                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10070                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10071                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10072                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10073                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10074                 </fields>
10075                 <links>
10076                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10077                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10078                 </links>
10079         </class>
10080
10081         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
10082                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10083                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10084                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10085                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10086                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10087                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10088                 </fields>
10089                 <links>
10090                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10091                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10092                 </links>
10093         </class>
10094
10095         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10096                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10097                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10098                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10099                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10100                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10101                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10102                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10103                 </fields>
10104                 <links>
10105                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10106                 </links>
10107         </class>
10108
10109         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10110                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10111                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10112                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10113                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10114                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10115                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10116                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10117                 </fields>
10118                 <links>
10119                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10120                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10121                 </links>
10122         </class>
10123
10124         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10125                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10126                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10127                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10128                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10129                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10130                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10131                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10132                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10133                 </fields>
10134                 <links>
10135                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10136                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10137                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10138                 </links>
10139         </class>
10140
10141         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10142                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10143                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10144                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10145                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10146                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10147                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10148                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10149                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10150                 </fields>
10151                 <links>
10152                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10153                 </links>
10154         </class>
10155
10156         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10157                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10158                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10159                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10160                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10161                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10162                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10163                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10164                 </fields>
10165                 <links>
10166                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10167                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10168                 </links>
10169         </class>
10170
10171         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10172                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10173                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10174                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10175                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10176                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10177                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10178                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10179                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10180                 </fields>
10181                 <links>
10182                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10183                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10184                 </links>
10185         </class>
10186
10187         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10188                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10189                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10190                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10191                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10192                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10193                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10194                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10195                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10196                 </fields>
10197                 <links>
10198                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10199                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10200                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10201                 </links>
10202         </class>
10203
10204         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10205                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10206                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10207                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10208                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10209                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10210                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10211                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10212                 </fields>
10213                 <links>
10214                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10215                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10216                 </links>
10217         </class>
10218
10219         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10220                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10221                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10222                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10223                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10224                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10225                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10226                 </fields>
10227                 <links>
10228                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10229                 </links>
10230         </class>
10231
10232         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10233                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10234                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10235                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10236                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10237                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10238                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10239                 </fields>
10240                 <links>
10241                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10242                 </links>
10243         </class>
10244
10245         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10246                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10247                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10248                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10249                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10250                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10251                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10252                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10253                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10254                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10255                 </fields>
10256                 <links>
10257                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10258                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10259                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10260                 </links>
10261         </class>
10262
10263         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10264                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10265                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10266                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10267                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10268                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10269                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10270                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10271                 </fields>
10272                 <links>
10273                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10274                 </links>
10275         </class>
10276
10277         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10278                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10279                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10280                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10281                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10282                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10283                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10284                 </fields>
10285                 <links>
10286                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10287                 </links>
10288         </class>
10289
10290         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10291                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10292                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10293                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10294                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10295                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10296                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10297                 </fields>
10298                 <links>
10299                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10300                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10301                 </links>
10302         </class>
10303
10304         <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">
10305                 <fields oils_persist:primary="id">
10306                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10307                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10308                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10309                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10310                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10311                 </fields>
10312                 <links>
10313                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10314                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10315                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10316                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10317                 </links>
10318         </class>
10319
10320         <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">
10321                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10322                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10323                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10324                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10325                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10326                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10327                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10328                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10329                 </fields>
10330                 <links/>
10331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10332                         <actions>
10333                                 <retrieve/>
10334                         </actions>
10335                 </permacrud>
10336         </class>
10337
10338         <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">
10339                 <fields oils_persist:primary="ptype_key">
10340                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10341                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10342                 </fields>
10343                 <links/>
10344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10345                         <actions>
10346                                 <retrieve/>
10347                         </actions>
10348                 </permacrud>
10349         </class>
10350
10351         <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">
10352                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10353                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10354                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10355                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10356                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10357                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10358                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10359                 </fields>
10360                 <links>
10361                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10362                 </links>
10363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10364                         <actions>
10365                                 <retrieve/>
10366                         </actions>
10367                 </permacrud>
10368         </class>
10369
10370         <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">
10371                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10372                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10373                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10374                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10375                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10376                 </fields>
10377                 <links>
10378                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10379                 </links>
10380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10381                         <actions>
10382                                 <retrieve/>
10383                         </actions>
10384                 </permacrud>
10385         </class>
10386
10387     <class
10388         id="uvs"
10389         controller="open-ils.cstore open-ils.pcrud"
10390         oils_obj:fieldmapper="url_verify::session"
10391         oils_persist:tablename="url_verify.session"
10392         reporter:label="URL Verification Session"
10393     >
10394         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10395             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10396             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10397                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10398             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10399             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10400             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10401             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10402             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10403             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10404         </fields>
10405
10406         <links>
10407             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10408             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10409             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10410             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10411             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10412         </links>
10413
10414         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10415             <actions>
10416                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10417             </actions>
10418         </permacrud>
10419
10420     </class>
10421
10422     <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">
10423         <oils_persist:source_definition>
10424             SELECT
10425                 cbrebi.id AS id,  -- so we can have a pkey in our view
10426                 uvs.id AS session,
10427                 uvs.owning_lib,
10428                 cbrebi.target_biblio_record_entry
10429             FROM url_verify.session uvs
10430             JOIN container.biblio_record_entry_bucket cbreb
10431                 ON (uvs.container = cbreb.id)
10432             JOIN container.biblio_record_entry_bucket_item cbrebi
10433                 ON (cbrebi.bucket = cbreb.id)
10434         </oils_persist:source_definition>
10435         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10436             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10437             <field reporter:label="Session" name="session" reporter:datatype="link" />
10438             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10439             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10440         </fields>
10441         <links>
10442             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10443             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10444             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10445         </links>
10446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10447             <actions>
10448                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10449             </actions>
10450         </permacrud>
10451     </class>
10452
10453     <class
10454         id="uvus"
10455         controller="open-ils.cstore open-ils.pcrud"
10456         oils_obj:fieldmapper="url_verify::url_selector"
10457         oils_persist:tablename="url_verify.url_selector"
10458         reporter:label="URL Verification URL Selector"
10459     >
10460         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10461             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10462             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10463                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10464             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10465         </fields>
10466
10467         <links>
10468             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10469             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10470         </links>
10471
10472         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10473             <actions>
10474                 <create permission="URL_VERIFY">
10475                     <context link="session" field="owning_lib"/>
10476                 </create>
10477                 <retrieve permission="URL_VERIFY">
10478                     <context link="session" field="owning_lib"/>
10479                 </retrieve>
10480                 <update permission="URL_VERIFY">
10481                     <context link="session" field="owning_lib"/>
10482                 </update>
10483                 <delete permission="URL_VERIFY">
10484                     <context link="session" field="owning_lib"/>
10485                 </delete>
10486             </actions>
10487         </permacrud>
10488
10489     </class>
10490
10491     <class
10492         id="uvu"
10493         controller="open-ils.cstore open-ils.pcrud"
10494         oils_obj:fieldmapper="url_verify::url"
10495         oils_persist:tablename="url_verify.url"
10496         reporter:label="URL Verification URL"
10497     >
10498         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10499             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10500                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10501                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10502                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10503                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10504             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10505             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10506             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10507             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10508             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10509             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10510             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10511             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10512             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10513             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10514             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10515             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10516             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10517         </fields>
10518
10519         <links>
10520             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10521             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10522             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10523             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10524             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10525         </links>
10526
10527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10528             <actions>
10529                 <create permission="URL_VERIFY">
10530                     <context link="session" field="owning_lib"/>
10531                 </create>
10532                 <retrieve permission="URL_VERIFY">
10533                     <context link="session" field="owning_lib"/>
10534                 </retrieve>
10535                 <update permission="URL_VERIFY">
10536                     <context link="session" field="owning_lib"/>
10537                 </update>
10538                 <delete permission="URL_VERIFY">
10539                     <context link="session" field="owning_lib"/>
10540                 </delete>
10541             </actions>
10542         </permacrud>
10543
10544     </class>
10545
10546     <class
10547         id="uvva"
10548         controller="open-ils.cstore open-ils.pcrud"
10549         oils_obj:fieldmapper="url_verify::verification_attempt"
10550         oils_persist:tablename="url_verify.verification_attempt"
10551         reporter:label="URL Verification Attempt"
10552     >
10553         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10554             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10555                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10556                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10557             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10558             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10559         </fields>
10560
10561         <links>
10562             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10563             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10564         </links>
10565
10566         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10567             <actions>
10568                 <create permission="URL_VERIFY">
10569                     <context link="session" field="owning_lib"/>
10570                 </create>
10571                 <retrieve permission="URL_VERIFY">
10572                     <context link="session" field="owning_lib"/>
10573                 </retrieve>
10574                 <update permission="URL_VERIFY">
10575                     <context link="session" field="owning_lib"/>
10576                 </update>
10577                 <delete permission="URL_VERIFY">
10578                     <context link="session" field="owning_lib"/>
10579                 </delete>
10580             </actions>
10581         </permacrud>
10582
10583     </class>
10584
10585     <class
10586         id="uvuv"
10587         controller="open-ils.cstore open-ils.pcrud"
10588         oils_obj:fieldmapper="url_verify::url_verification"
10589         oils_persist:tablename="url_verify.url_verification"
10590         reporter:label="URL Verification"
10591     >
10592         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10593             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10594                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10595                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10596             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10597             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10598             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10599             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10600                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10601         </fields>
10602
10603         <links>
10604             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10605             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10606             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10607         </links>
10608
10609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10610             <actions>
10611                 <create permission="URL_VERIFY">
10612                     <context link="attempt" jump="session" field="owning_lib"/>
10613                 </create>
10614                 <retrieve permission="URL_VERIFY">
10615                     <context link="attempt" jump="session" field="owning_lib"/>
10616                 </retrieve>
10617                 <update permission="URL_VERIFY">
10618                     <context link="attempt" jump="session" field="owning_lib"/>
10619                 </update>
10620                 <delete permission="URL_VERIFY">
10621                     <context link="attempt" jump="session" field="owning_lib"/>
10622                 </delete>
10623             </actions>
10624         </permacrud>
10625
10626     </class>
10627
10628         <class
10629                 id="cfdi"
10630                 controller="open-ils.cstore open-ils.pcrud"
10631                 oils_obj:fieldmapper="config::filter_dialog_interface"
10632                 oils_persist:tablename="config.filter_dialog_interface"
10633                 reporter:label="FilterDialog Interface">
10634                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10635                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10636                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10637                 </fields>
10638                 <links>
10639                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10640                 </links>
10641                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10642                         <actions>
10643                                 <retrieve />
10644                         </actions>
10645                 </permacrud>
10646         </class>
10647
10648         <class
10649                 id="cfdfs"
10650                 controller="open-ils.cstore open-ils.pcrud"
10651                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10652                 oils_persist:tablename="config.filter_dialog_filter_set"
10653                 reporter:label="FilterDialog Filter Set">
10654                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10655                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10656                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10657                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10658                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10659                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10660                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10661                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10662                 </fields>
10663                 <links>
10664                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10665                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10666                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10667                 </links>
10668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10669                         <actions>
10670                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10671                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10672                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10673                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10674                         </actions>
10675                 </permacrud>
10676
10677         </class>
10678
10679         <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">
10680                 <fields oils_persist:primary="code">
10681                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10682                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10683                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10684                 </fields>
10685                 <links/>
10686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10687                         <actions>
10688                                 <retrieve/>
10689                         </actions>
10690                 </permacrud>
10691         </class>
10692
10693         <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">
10694                 <oils_persist:source_definition>
10695
10696             SELECT  b.id,
10697                     MAX(dcp.edit_date) AS last_delete_date
10698              FROM   biblio.record_entry b
10699                     JOIN asset.call_number cn ON (cn.record = b.id)
10700                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10701              WHERE  NOT b.deleted
10702              GROUP BY b.id
10703              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10704
10705                 </oils_persist:source_definition>
10706                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10707                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10708                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10709                 </fields>
10710                 <links>
10711                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10712                 </links>
10713                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10714                         <actions>
10715                                 <retrieve/>
10716                         </actions>
10717                 </permacrud>
10718         </class>
10719
10720         <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">
10721                 <oils_persist:source_definition>
10722
10723             -- -- 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.
10724             -- -- 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
10725             -- -- may not.
10726             -- SELECT
10727             --     bre.id AS bib_id,
10728             --     COALESCE( z.copy_count, 0 ) AS copy_count,
10729             --     COALESCE( z.hold_count, 0 ) AS hold_count,
10730             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
10731             -- FROM (
10732                 SELECT
10733                     y.bre AS id,
10734                     COALESCE( x.copy_count, 0 ) AS copy_count,
10735                     y.hold_count AS hold_count,
10736                     (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
10737                 FROM (
10738                         SELECT
10739                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
10740                             COUNT(*) AS hold_count
10741                         FROM action.hold_request h
10742                         WHERE
10743                             cancel_time IS NULL
10744                             AND fulfillment_time IS NULL
10745                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10746                         GROUP BY 1
10747                     )y LEFT JOIN (
10748                         SELECT 
10749                             (SELECT id
10750                                 FROM biblio.record_entry 
10751                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10752                             ) AS bre, 
10753                             COUNT(*) AS copy_count
10754                         FROM asset.copy
10755                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10756                         WHERE copy.holdable 
10757                             AND NOT copy.deleted 
10758                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10759                         GROUP BY 1
10760                     )x ON x.bre = y.bre
10761                 -- )z RIGHT JOIN (
10762                 --     SELECT id
10763                 --     FROM biblio.record_entry
10764                 --     WHERE NOT deleted
10765                 -- )bre ON (z.bib_id = bre.id)
10766                 
10767
10768                 </oils_persist:source_definition>
10769                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10770                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10771                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10772                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10773                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10774                 </fields>
10775                 <links>
10776                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10777                 </links>
10778                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10779                         <actions>
10780                                 <retrieve/>
10781                         </actions>
10782                 </permacrud>
10783         </class>
10784
10785         <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">
10786                 <oils_persist:source_definition>
10787             SELECT *,
10788                 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,
10789                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10790             FROM
10791                 (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
10792                     FROM
10793                         action.hold_request ahr
10794                         JOIN reporter.hold_request_record rhrr USING (id)
10795                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10796                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10797                     WHERE
10798                         ahr.cancel_time IS NULL
10799                         AND ahr.fulfillment_time IS NULL
10800                     GROUP BY bib_record, pickup_lib
10801                 )x
10802                 JOIN
10803                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10804                     FROM
10805                         action.hold_request ahr
10806                         JOIN reporter.hold_request_record rhrr USING (id)
10807                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10808                     WHERE
10809                         ahr.cancel_time IS NULL
10810                         AND ahr.fulfillment_time IS NULL
10811                     GROUP BY bib_record
10812                 )y
10813                 USING (id)
10814                 </oils_persist:source_definition>
10815                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10816                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10817                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10818                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10819                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10820                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10821                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10822                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10823                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10824                 </fields>
10825                 <links>
10826                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10827                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10828                 </links>
10829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10830                         <actions>
10831                                 <retrieve/>
10832                         </actions>
10833                 </permacrud>
10834         </class>
10835
10836         <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) ">
10837                 <oils_persist:source_definition>
10838             WITH counts_at_ou AS (
10839                 SELECT  rhrr.bib_record AS id,
10840                         aou.id AS pickup_lib_or_desc,
10841                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
10842                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
10843                   FROM  actor.org_unit aou
10844                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
10845                         action.hold_request ahr
10846                         JOIN reporter.hold_request_record rhrr USING (id)
10847                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10848                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
10849                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
10850                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
10851                         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
10852                   GROUP BY 1, 2
10853             )
10854             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
10855                    y.holds_everywhere, y.copy_count_everywhere,
10856                 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,
10857                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
10858             FROM counts_at_ou x
10859                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10860                     FROM
10861                         action.hold_request ahr
10862                         JOIN reporter.hold_request_record rhrr USING (id)
10863                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10864                     WHERE
10865                         ahr.cancel_time IS NULL
10866                         AND ahr.fulfillment_time IS NULL
10867                     GROUP BY bib_record
10868                 )y
10869                 USING (id)
10870                 </oils_persist:source_definition>
10871                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10872                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10873                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
10874                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
10875                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
10876                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10877                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10878                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
10879                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10880                 </fields>
10881                 <links>
10882                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10883                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
10884                 </links>
10885                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10886                         <actions>
10887                                 <retrieve/>
10888                         </actions>
10889                 </permacrud>
10890         </class>
10891
10892         <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">
10893                 <oils_persist:source_definition>
10894             SELECT
10895                 ac.id,
10896                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10897                 MAX(actac.xact_start) AS last_circ
10898             FROM asset.copy ac
10899                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10900             GROUP BY ac.id
10901
10902             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10903             --SELECT
10904             --    ac.id,
10905             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10906             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10907             --FROM asset.copy ac
10908             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10909             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10910             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10911                 </oils_persist:source_definition>
10912                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10913                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10914                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10915                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10916                 </fields>
10917                 <links>
10918                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10919                 </links>
10920                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10921                         <actions>
10922                                 <retrieve/>
10923                         </actions>
10924                 </permacrud>
10925         </class>
10926
10927         <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">
10928                 <fields oils_persist:primary="id">
10929                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10930                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10931                 </fields>
10932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10933                         <actions>
10934                                 <retrieve/>
10935                         </actions>
10936                 </permacrud>
10937         </class>
10938
10939         <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">
10940                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10941                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10942                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10943                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10944                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10945                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10946                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10947                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10948                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10949                 </fields>
10950                 <links>
10951                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10952                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10953                 </links>
10954                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10955                         <actions>
10956                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10957                                 <retrieve/>
10958                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10959                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10960                         </actions>
10961                 </permacrud>
10962         </class>
10963
10964         <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">
10965                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10966                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10967                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10968                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10969                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10970                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10971                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10972                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10973                 </fields>
10974                 <links>
10975                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10976                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10977                 </links>
10978                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10979                         <actions>
10980                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10981                                 <retrieve/>
10982                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10983                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10984                         </actions>
10985                 </permacrud>
10986         </class>
10987
10988
10989         <!-- ********************************************************************************************************************* -->
10990         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10991         <!-- ********************************************************************************************************************* -->
10992         <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">
10993                 <fields oils_persist:primary="id">
10994                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10995                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10996                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10997                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10998                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10999                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11000                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11001                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11002                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11003                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11004                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11005                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11006                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11007                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11008                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11009                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11010                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11011                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11012                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11013                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11014                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11015                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11016                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11017                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11018                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11019                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11020                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11021                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11022                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11023                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11024                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11025                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11026                 </fields>
11027                 <links>
11028                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11029                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11030                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11031                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11032                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11033                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11034                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11035                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11036                 </links>
11037         </class>
11038
11039         <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">
11040                 <fields oils_persist:primary="id">
11041                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11042                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11043                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11044                 </fields>
11045                 <links>
11046                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11047                 </links>
11048         </class>
11049
11050         <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">
11051                 <fields oils_persist:primary="id">
11052                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11053                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11054                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11055                 </fields>
11056                 <links>
11057                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11058                 </links>
11059         </class>
11060
11061         <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">
11062                 <fields oils_persist:primary="id">
11063                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11064
11065                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11066                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11067                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11068
11069                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11070                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11071                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11072
11073                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11074                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11075
11076                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11077                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
11078                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
11079
11080                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
11081                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
11082
11083                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
11084                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11085                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11086
11087                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11088                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11089                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11090
11091                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11092                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11093                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11094                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11095
11096                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11097                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11098
11099                 </fields>
11100                 <links>
11101                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11102                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11103                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11104                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11105                 </links>
11106         </class>
11107
11108         <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">
11109                 <oils_persist:source_definition>
11110
11111             SELECT
11112                 po.ordering_agency AS ordering_agency,
11113                 po.id AS purchase_order,
11114                 li.id AS lineitem,
11115                 lid.id AS lineitem_detail,
11116                 cpa.id AS claim_policy_action
11117             FROM
11118                 acq.lineitem_detail lid
11119                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11120                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11121                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11122                 JOIN acq.claim_policy_action cpa ON (
11123                     cpa.claim_policy = cp.id
11124
11125                     -- we only care about claim policy actions whose claim
11126                     -- interval we'd reached or exceeded
11127                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11128
11129                     -- filter out all claim policy actions where claim events
11130                     -- have occurred on or after the action's action_interval
11131                     AND NOT EXISTS (
11132                         SELECT 1
11133                         FROM
11134                             acq.claim_event evt
11135                             JOIN acq.claim claim ON (
11136                                 claim.id = evt.claim
11137                                 AND claim.lineitem_detail = lid.id
11138                             )
11139                         WHERE
11140                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11141                     )
11142                 )
11143             WHERE
11144                 lid.cancel_reason IS NULL
11145                 AND li.cancel_reason IS NULL -- belt/suspenders
11146                 AND po.cancel_reason IS NULL -- belt/suspenders
11147                 AND lid.recv_time IS NULL
11148                 AND po.state = 'on-order'
11149             ORDER BY 1, 2, 3, 4, 5
11150
11151                 </oils_persist:source_definition>
11152                 <fields>
11153                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11154                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11155                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11156                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11157                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11158                 </fields>
11159                 <links>
11160                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11161                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11162                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11163                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11164                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11165                 </links>
11166         </class>
11167         <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">
11168                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11169                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11170                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11171                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11172                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11173                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11174                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11175                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11176                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11177                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11178                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11179                 </fields>
11180                 <links>
11181                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11182                 </links>
11183     </class>
11184         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11185                 <oils_persist:source_definition>
11186             SELECT * FROM acq.lineitem_summary 
11187                                 WHERE item_count > (invoice_count + cancel_count)
11188         </oils_persist:source_definition>
11189                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11190                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11191                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11192                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11193                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11194                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11195                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11196                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11197                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11198                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11199                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11200                 </fields>
11201                 <links>
11202                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11203                 </links>
11204     </class>
11205         <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">
11206                 <oils_persist:source_definition>
11207
11208                         SELECT  t.*
11209                           FROM  action.transit_copy t
11210                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11211                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11212                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11213
11214                 </oils_persist:source_definition>
11215                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11216                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11217                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11218                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11219                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11220                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11221                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11222                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11223                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11224                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11225                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11226                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
11227                 </fields>
11228                 <links>
11229                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11230                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11231                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11232                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11233                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11234                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11235                 </links>
11236         </class>
11237
11238     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11239                 <oils_persist:source_definition>
11240
11241         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11242                 SELECT
11243                         cp.id as copy,
11244                         COUNT(circ.id),
11245                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11246                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11247                 FROM
11248                         asset.copy cp
11249                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11250                 GROUP BY 1, 3, 4
11251                 UNION ALL
11252                 SELECT
11253                         cp.id as copy,
11254                         COUNT(circ.id),
11255                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11256                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11257                 FROM
11258                         asset.copy cp
11259                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11260                 GROUP BY 1, 3, 4
11261                 UNION ALL
11262                 SELECT
11263                         id as copy,
11264                         circ_count,
11265                         -1 AS year,
11266                         false as is_renewal
11267                 FROM
11268                         extend_reporter.legacy_circ_count
11269         )x GROUP BY 1, 3, 4
11270
11271                 </oils_persist:source_definition>
11272         <fields>
11273             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11274             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11275             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11276             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11277         </fields>
11278                 <links>
11279                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11280                 </links>
11281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11282                         <actions>
11283                                 <retrieve/>
11284                         </actions>
11285                 </permacrud>
11286     </class>
11287
11288         <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">
11289                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11290                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11291                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11292                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11293                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11294                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11295                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11296                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11297                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11298                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11299                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11300                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11301                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11302                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11303                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11304                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11305                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11306                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11307                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11308                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11309                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11310                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11311                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11312                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11313                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11314                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11315                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11316                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11317                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11318                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11319                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11320                 </fields>
11321                 <links>
11322                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11323                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11324                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11325                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11326                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11327                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11328                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11329                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11330                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11331                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11332                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11333                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11334                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11335                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11336                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11337                 </links>
11338         </class>
11339
11340     <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">
11341         <fields oils_persist:primary="id">
11342             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11343             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11344             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11345             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11346             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11347             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11348             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11349             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11350             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11351             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11352             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11353             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11354             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11355             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11356             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11357             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11358             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11359             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11360             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11361             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11362             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11363             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11364             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11365             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11366             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11367             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11368             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11369             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11370             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11371             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11372             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11373             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11374             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11375             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11376         </fields>
11377         <links>
11378             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11379             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11380             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11381             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11382             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11383             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11384             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11385             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11386         </links>
11387     </class>
11388
11389     <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">
11390         <fields oils_persist:primary="id">
11391             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11392             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11393             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11394             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11395         </fields>
11396         <links>
11397             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11398             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11399         </links>
11400     </class>
11401
11402     <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">
11403         <fields oils_persist:primary="owning_lib">
11404             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11405             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11406             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11407         </fields>
11408         <links>
11409             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11410         </links>
11411     </class>
11412
11413     <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">
11414         <fields oils_persist:primary="id">
11415             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11416             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11417             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11418             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11419             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11420         </fields>
11421         <links>
11422             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11423             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11424             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11425         </links>
11426     </class>
11427
11428     <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">
11429         <fields oils_persist:primary="circ_lib">
11430             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11431             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11432             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11433             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11434         </fields>
11435         <links>
11436             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11437             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11438         </links>
11439     </class>
11440
11441     <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">
11442         <fields oils_persist:primary="id">
11443             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11444             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11445             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11446             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11447             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11448         </fields>
11449         <links>
11450             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11451             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11452             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11453         </links>
11454     </class>
11455
11456     <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">
11457         <fields oils_persist:primary="home_ou">
11458             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11459             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11460             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11461             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11462         </fields>
11463         <links>
11464             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11465             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11466         </links>
11467     </class>
11468         <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">
11469                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11470                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11471                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11472                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11473                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11474                 </fields>
11475                 <links>
11476                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11477                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11478                 </links>
11479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11480                         <actions>
11481                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11482                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11483                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11484                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11485                         </actions>
11486                 </permacrud>
11487         </class>
11488         <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">
11489                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11490                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11491                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11492                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11493                 </fields>
11494                 <links>
11495                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11496                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11497                         </links>
11498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11499                 <actions>
11500                                 <create permission="ADMIN_ACQ_FUND_TAG">
11501                                         <context link="tag" field="owner"/>
11502                                 </create>
11503                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11504                                         <context link="tag" field="owner"/>
11505                                 </retrieve>
11506                                 <update permission="ADMIN_ACQ_FUND_TAG">
11507                                         <context link="tag" field="owner"/>
11508                                 </update>
11509                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11510                                         <context link="tag" field="owner"/>
11511                                 </delete>
11512                         </actions>
11513                 </permacrud>
11514         </class>
11515         <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">
11516                 <oils_persist:source_definition><![CDATA[
11517                 SELECT
11518                         poi.purchase_order AS purchase_order,
11519                         ii.invoice AS invoice,
11520                         NULL AS lineitem,
11521                         poi.id AS po_item,
11522                         NULL AS picklist
11523                 FROM
11524                         acq.po_item poi
11525                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11526                 UNION SELECT
11527                         jub.purchase_order AS purchase_order,
11528                         ie.invoice AS invoice,
11529                         jub.id AS lineitem,
11530                         NULL AS po_item,
11531                         jub.picklist AS picklist
11532                 FROM
11533                         acq.lineitem jub
11534                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11535                 UNION SELECT
11536                         ii.purchase_order AS purchase_order,
11537                         ii.invoice AS invoice,
11538                         NULL AS lineitem,
11539                         NULL AS po_item,
11540                         NULL AS picklist
11541                 FROM
11542                         acq.invoice_item ii
11543                 WHERE ii.po_item IS NULL
11544                 UNION SELECT
11545                         ie.purchase_order AS purchase_order,
11546                         ie.invoice AS invoice,
11547                         NULL AS lineitem,
11548                         NULL AS po_item,
11549                         NULL AS picklist
11550                 FROM
11551                         acq.invoice_entry ie
11552                 WHERE ie.lineitem IS NULL
11553                 UNION SELECT
11554                         NULL AS purchase_order,
11555                         NULL AS invoice,
11556                         jub.id AS lineitem,
11557                         NULL AS po_item,
11558                         jub.picklist AS picklist
11559                 FROM
11560                         acq.lineitem jub
11561                 WHERE jub.purchase_order IS NULL
11562                 ]]></oils_persist:source_definition>
11563                 <fields>
11564                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11565                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11566                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11567                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11568                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11569                 </fields>
11570                 <links>
11571                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11572                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11573                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11574                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11575                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11576                 </links>
11577         </class>
11578         <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">
11579                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11580                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11581                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11582                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11583                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11584                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11585                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11586                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11587                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11588                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11589                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11590                 </fields>
11591                 <links>
11592                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11593                 </links>
11594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11595                         <actions>
11596                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11597                                 <retrieve/>
11598                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11599                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11600                         </actions>
11601                 </permacrud>
11602         </class>
11603
11604         <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">
11605                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11606                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11607                         <field name="date_applied" reporter:datatype="timestamp"/>
11608                         <field name="org" reporter:datatype="org_unit"/>
11609                         <field name="original_value" reporter:datatype="text"/>
11610                         <field name="new_value" reporter:datatype="text"/>
11611                         <field name="field_name" reporter:datatype="link"/>
11612                 </fields>
11613                 <links>
11614                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11615                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11616                 </links>
11617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11618                         <actions>
11619                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11620                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11621                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11622                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11623                         </actions>
11624                 </permacrud>
11625         </class>
11626         <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">
11627                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11628                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11629                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11630                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11631                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11632                 </fields>
11633                 <links>
11634                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11635                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11636                 </links>
11637         </class>
11638         <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">
11639                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11640                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11641                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11642                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11643                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11644                 </fields>
11645                 <links>
11646                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11647                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11648                 </links>
11649         </class>
11650         <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">
11651                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11652                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
11653                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11654                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11655                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11656                 </fields>
11657                 <links>
11658                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11659                 </links>
11660                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11661                         <actions>
11662                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11663                                 <retrieve/>
11664                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11665                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11666                         </actions>
11667                 </permacrud>
11668         </class>
11669         <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">
11670                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11671                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11672                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11673                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11674                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11675                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11676                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11677                 </fields>
11678                 <links>
11679                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11680                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11681                 </links>
11682                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11683                         <actions>
11684                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11685                                 <retrieve/>
11686                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11687                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11688                         </actions>
11689                 </permacrud>
11690         </class>
11691         <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">
11692                 <fields oils_persist:primary="code">
11693                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
11694                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
11695                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
11696                 </fields>
11697                 <links>
11698                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11699                 </links>
11700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11701                         <actions>
11702                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11703                                 <retrieve/>
11704                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11705                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11706                         </actions>
11707                 </permacrud>
11708         </class>
11709         <class id="acpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag" oils_persist:tablename="asset.copy_tag" reporter:label="Copy Tags" oils_persist:field_safe="true">
11710                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
11711                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11712                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
11713                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11714                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11715                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
11716                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
11717                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
11718                 </fields>
11719                 <links>
11720                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
11721                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11722                 </links>
11723                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11724                         <actions>
11725                                 <create permission="ADMIN_COPY_TAGS" context_field="owner"/>
11726                                 <retrieve/>
11727                                 <update permission="ADMIN_COPY_TAGS" context_field="owner"/>
11728                                 <delete permission="ADMIN_COPY_TAGS" context_field="owner"/>
11729                         </actions>
11730                 </permacrud>
11731         </class>
11732         <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">
11733                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
11734                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11735                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
11736                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
11737                 </fields>
11738                 <links>
11739                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11740                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
11741                 </links>
11742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11743                         <actions>
11744                                 <create permission="UPDATE_COPY">
11745                     <context link="copy" field="circ_lib"/>
11746                 </create>
11747                                 <retrieve/>
11748                                 <update permission="UPDATE_COPY">
11749                     <context link="copy" field="circ_lib"/>
11750                 </update>
11751                                 <delete permission="UPDATE_COPY">
11752                     <context link="copy" field="circ_lib"/>
11753                 </delete>
11754                         </actions>
11755                 </permacrud>
11756         </class>
11757         <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">
11758         <oils_persist:source_definition>
11759         SELECT ahcm.target_copy AS id,count(*) AS count
11760          FROM
11761          action.hold_request ahr,
11762          action.hold_copy_map ahcm
11763          WHERE
11764          ahr.cancel_time IS NULL AND
11765          ahr.fulfillment_time IS NULL AND
11766          ahr.capture_time IS NULL AND
11767          ahr.id = ahcm.hold
11768          GROUP BY ahcm.target_copy
11769         </oils_persist:source_definition>
11770         <fields oils_persist:primary="id">
11771             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11772             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11773         </fields>
11774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11775             <actions>
11776                <retrieve/>
11777             </actions>
11778         </permacrud>
11779         </class>
11780
11781         <!-- ********************************************************************************************************************* -->
11782
11783 </IDL>
11784
11785 <!--
11786     vim:noet:ts=4:sw=4:
11787 -->