]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1661661: Use new rtl field in config.i18n_locale
[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="Keep" name="keep" reporter:datatype="bool"/>
424                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
425                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
426                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
427                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
428                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
429                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
430                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
431                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
432                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
433                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
434                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
435                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
436                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
437                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
438                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
439                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
440                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
441                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
442                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
443                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
444                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
445                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
446                 </fields>
447                 <links>
448                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
449                 </links>
450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
451                         <actions>
452                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
456                         </actions>
457                 </permacrud>
458         </class>
459
460         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
461                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
462                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
463                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
464                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
465                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
466                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
467                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
468                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
469                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
470                 </fields>
471                 <links>
472                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
473                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
474                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
475                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
476                 </links>
477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
478                         <actions>
479                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
482                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
483                         </actions>
484                 </permacrud>
485         </class>
486
487         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
488                 <fields oils_persist:primary="code">
489                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
490                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
491                 </fields>
492                 <links>
493                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
494                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
495                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
496                 </links>
497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
498                         <actions>
499                                 <retrieve/>
500                         </actions>
501                 </permacrud>
502         </class>
503
504         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
505                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
506                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
507                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
509                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
510                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
511                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
512                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
513                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
514                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
515                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
516                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
519                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
520                 </fields>
521                 <links>
522                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
523                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
524                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
525                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
526             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
527             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
528             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
529                 </links>
530                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
531                         <actions>
532                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
535                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
536                         </actions>
537                 </permacrud>
538         </class>
539
540         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
541                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
542                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
543                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
544                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
545                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
546                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
547                 </fields>
548                 <links/>
549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
550                         <actions>
551                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
552                 <retrieve/>
553                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
555                         </actions>
556                 </permacrud>
557         </class>
558
559         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
560                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
561                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
562                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
563                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
564                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
565                 </fields>
566                 <links>
567                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
568                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
569                 </links>
570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
571                         <actions>
572                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
575                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
576                         </actions>
577                 </permacrud>
578         </class>
579
580         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
581                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
582                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
583                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
584                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
585                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
586                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
587                 </fields>
588                 <links>
589                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
590                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
591                 </links>
592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
593                         <actions>
594                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
597                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
598                         </actions>
599                 </permacrud>
600         </class>
601
602         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
603                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
604                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
605                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
606                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
607                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
608                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
609                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
610                 </fields>
611                 <links>
612                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
613                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
614                 </links>
615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
616                         <actions>
617                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                         </actions>
622                 </permacrud>
623         </class>
624
625         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
626                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
627                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
628                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
630                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
631                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
632                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
633                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
634                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
635                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
636                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
638                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
639                 </fields>
640                 <links>
641                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
642                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
643                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
644             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
645             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
646                 </links>
647                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
648                         <actions>
649                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
653                         </actions>
654                 </permacrud>
655         </class>
656
657         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
658                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
659                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
660                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
661                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
662                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
663                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
664                 </fields>
665                 <links/>
666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
667                         <actions>
668                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
669                 <retrieve/>
670                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
672                         </actions>
673                 </permacrud>
674         </class>
675
676         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
677                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
678                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
679                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
680                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
681                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
682                 </fields>
683                 <links>
684                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
685                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
686                 </links>
687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
688                         <actions>
689                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
693                         </actions>
694                 </permacrud>
695         </class>
696
697         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
698                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
699                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
700                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
701                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
702                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
703                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
704                 </fields>
705                 <links>
706                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
707                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
708                 </links>
709                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
710                         <actions>
711                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
715                         </actions>
716                 </permacrud>
717         </class>
718
719         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
720                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
721                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
722                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
723                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
724                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
725                 </fields>
726                 <links>
727                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
728                 </links>
729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
730                         <actions>
731                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
735                         </actions>
736                 </permacrud>
737         </class>
738
739         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
740                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
741                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
742                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
743                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
744                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
745                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
746                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
747                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
748             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
749                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
750                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
751                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
752                 </fields>
753                 <links>
754                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
755                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
756                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
757                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
758                 </links>
759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
760                         <actions>
761                                 <create permission="ADMIN_IMPORT_MATCH_SET">
762                     <context link="match_set" field="owner"/>
763                                 </create>
764                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
765                     <context link="match_set" field="owner"/>
766                                 </retrieve>
767                                 <update permission="ADMIN_IMPORT_MATCH_SET">
768                     <context link="match_set" field="owner"/>
769                                 </update>
770                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
771                     <context link="match_set" field="owner"/>
772                                 </delete>
773                         </actions>
774                 </permacrud>
775         </class>
776
777         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
778                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
779                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
780                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
781                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
782                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
783                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
784                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
785                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
786                 </fields>
787                 <links>
788                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
789                 </links>
790                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
791                         <actions>
792                                 <create permission="ADMIN_IMPORT_MATCH_SET">
793                     <context link="match_set" field="owner"/>
794                                 </create>
795                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
796                     <context link="match_set" field="owner"/>
797                                 </retrieve>
798                                 <update permission="ADMIN_IMPORT_MATCH_SET">
799                     <context link="match_set" field="owner"/>
800                                 </update>
801                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
802                     <context link="match_set" field="owner"/>
803                                 </delete>
804                         </actions>
805                 </permacrud>
806         </class>
807
808         <class id="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">
809                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
810                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
811                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
812                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
813                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
814                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
815                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
816                 </fields>
817                 <links>
818                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
819                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
820                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
821                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
822                 </links>
823         </class>
824
825     <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">
826         <fields oils_persist:primary="name">
827             <field reporter:label="Name" name="name" reporter:datatype="text"/>
828             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
829             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
830             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
831         </fields>
832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
833             <actions>
834                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
835                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
836                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
837                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
838             </actions>
839         </permacrud>
840     </class>
841
842     <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">
843         <fields oils_persist:primary="id">
844             <field reporter:label="ID" name="id" reporter:datatype="id"/>
845             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
846             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
847             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
848             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
849         </fields>
850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
851             <actions>
852                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
853                 <retrieve/>
854                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
855                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
856             </actions>
857         </permacrud>
858     </class>
859
860         <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">
861                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
862                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
863                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
864                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
865                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
866                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
867                 </fields>
868                 <links>
869                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
870                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
871                 </links>
872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
873             <actions>
874                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
875                 <retrieve/>
876                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
877                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
878             </actions>
879         </permacrud>
880         </class>
881
882         <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">
883                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
884                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
885                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
886                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
887         </fields>
888         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
889             <actions>
890                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
891                 <retrieve/>
892                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
893                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
894             </actions>
895         </permacrud>
896         </class>
897
898         <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">
899                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
900                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
901                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
902                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
903                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
904                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
905                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
906                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
907                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
908                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
909                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
910                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
911         </fields>
912                 <links>
913                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
914                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
915         </links>
916         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
917             <actions>
918                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
919                 <retrieve/>
920                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
921                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
922             </actions>
923         </permacrud>
924         </class>
925
926         <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">
927                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
928                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
929                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
930                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
931                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
933                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
934                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
935                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
936                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
937                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
938         </fields>
939                 <links>
940                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
941                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
942         </links>
943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
944             <actions>
945                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
946                 <retrieve/>
947                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
948                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
949             </actions>
950         </permacrud>
951         </class>
952
953         <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">
954                 <fields oils_persist:primary="name">
955                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
956                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
957                         <field reporter:label="Description" name="description" reporter:datatype="text" />
958                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
959                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
960                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
961                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
962                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
963                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
964                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
965                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
966                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
967                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
968                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
969                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
970                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
971                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
972                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
973                 </fields>
974                 <links>
975                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
976                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
977                 </links>
978         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
979             <actions>
980                 <create permission="ADMIN_SVF" global_required="true"/>
981                 <retrieve/>
982                 <update permission="ADMIN_SVF" global_required="true"/>
983                 <delete permission="ADMIN_SVF" global_required="true"/>
984             </actions>
985         </permacrud>
986         </class>
987
988         <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">
989                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
990                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
991                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
992                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
993             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
994                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
995                 </fields>
996                 <links/>
997         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
998             <actions>
999                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1000                 <retrieve/>
1001                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1002                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1003             </actions>
1004         </permacrud>
1005         </class>
1006
1007         <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">
1008                 <fields oils_persist:primary="coded_value">
1009                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1010                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1011                 </fields>
1012                 <links>
1013                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1014                 </links>
1015         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1016             <actions>
1017                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1018                 <retrieve/>
1019                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1020                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1021             </actions>
1022         </permacrud>
1023         </class>
1024
1025         <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">
1026                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1027                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1028                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1029                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1030                 </fields>
1031                 <links>
1032                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1033                 </links>
1034         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1035             <actions>
1036                 <retrieve/>
1037             </actions>
1038         </permacrud>
1039         </class>
1040
1041
1042         <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">
1043                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1044                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1045                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1046                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1047                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1048                 </fields>
1049                 <links>
1050                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1051                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1052                 </links>
1053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1054             <actions>
1055                 <retrieve/>
1056             </actions>
1057         </permacrud>
1058         </class>
1059
1060
1061         <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">
1062                 <fields oils_persist:primary="source">
1063                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1064                         <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 -->
1065                 </fields>
1066                 <links>
1067                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1068                 </links>
1069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1070             <actions>
1071                 <retrieve/>
1072             </actions>
1073         </permacrud>
1074         </class>
1075
1076         <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">
1077                 <fields>
1078                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1079                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1080                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1081                 </fields>
1082                 <links>
1083                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1084                 </links>
1085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1086             <actions>
1087                 <retrieve/>
1088             </actions>
1089         </permacrud>
1090         </class>
1091
1092         <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">
1093                 <fields oils_persist:primary="id">
1094                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1095                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1096                 </fields>
1097                 <links>
1098                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1099                 </links>
1100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1101             <actions>
1102                 <retrieve/>
1103             </actions>
1104         </permacrud>
1105         </class>
1106
1107         <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">
1108                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1109                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1110                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1111                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1112                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1113                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1114                 </fields>
1115                 <links>
1116                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1117                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1118                 </links>
1119         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1120             <actions>
1121                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1122                 <retrieve/>
1123                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1124                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1125             </actions>
1126         </permacrud>
1127         </class>
1128
1129         <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">
1130                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1131                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1132                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1133                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1134                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1135                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1136                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1137                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1138             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1139             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1140             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1141                 </fields>
1142                 <links>
1143                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1144                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1145                 </links>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1149                 <retrieve/>
1150                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1151                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1152             </actions>
1153         </permacrud>
1154         </class>
1155
1156         <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">
1157                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1158                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1159                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1160                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1161                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1162                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1163                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1164                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1165                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1166                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1167                 </fields>
1168                 <links>
1169                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1170                 </links>
1171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1172             <actions>
1173                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1174                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1175                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1176                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1177             </actions>
1178         </permacrud>
1179         </class>
1180
1181     <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">
1182         <fields oils_persist:primary="name">
1183             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1184             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1185             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1186             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1187             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1188             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1189             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1190             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1191             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1192             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1193         </fields>
1194         <links>
1195             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1196             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1197         </links>
1198         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1199             <actions>
1200                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1201                 <retrieve/>
1202                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1203                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1204             </actions>
1205         </permacrud>
1206     </class>
1207
1208     <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">
1209         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1210             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1211             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1212             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1213             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1214             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1215             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1216             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1217         </fields>
1218         <links>
1219             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1220         </links>
1221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1222             <actions>
1223                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1224                 <retrieve/>
1225                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1226                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1227             </actions>
1228         </permacrud>
1229     </class>
1230
1231     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1232                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1233                         oils_persist:tablename="config.z3950_index_field_map" 
1234                         reporter:label="Z39.50 Index Field Map">
1235         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1236             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1237             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1238             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1239             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1240             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1241             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1242         </fields>
1243         <links>
1244             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1245             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1246             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1247         </links>
1248         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1249             <actions>
1250                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1251                 <retrieve/>
1252                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1253                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1254             </actions>
1255         </permacrud>
1256     </class>
1257
1258
1259         <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">
1260                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1261                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1262                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1263                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1264                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1265                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1266                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1267                 </fields>
1268                 <links>
1269             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1270             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1271                 </links>
1272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1273                         <actions>
1274                                 <retrieve/>
1275                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1276                         </actions>
1277                 </permacrud>
1278         </class>
1279
1280         <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">
1281                 <fields oils_persist:primary="key">
1282                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1283                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1284                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1285                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1286                 </fields>
1287                 <links/>
1288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1289                         <actions>
1290                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1291                                 <retrieve/>
1292                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1293                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1294                         </actions>
1295                 </permacrud>
1296         </class>
1297
1298         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1299                 <fields oils_persist:primary="module">
1300                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1301                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1302                 </fields>
1303                 <links/>
1304         </class>
1305
1306         <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">
1307                 <fields oils_persist:primary="module">
1308                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1309                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1310                 </fields>
1311                 <links/>
1312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1313                         <actions>
1314                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1315                                 <retrieve/>
1316                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1317                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1318                         </actions>
1319                 </permacrud>
1320         </class>
1321
1322         <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">
1323                 <fields oils_persist:primary="module">
1324                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1325                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1326                 </fields>
1327                 <links/>
1328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1329                         <actions>
1330                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1331                                 <retrieve/>
1332                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1333                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1334                         </actions>
1335                 </permacrud>
1336         </class>
1337
1338         <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">
1339                 <fields oils_persist:primary="module">
1340                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1341                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1342                 </fields>
1343                 <links/>
1344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1345                         <actions>
1346                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1347                                 <retrieve/>
1348                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1349                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1350                         </actions>
1351                 </permacrud>
1352         </class>
1353
1354         <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">
1355                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1356                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1357                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1358                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1359                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1360                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1361                 </fields>
1362                 <links>
1363                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1364                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1365                 </links>
1366                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1367                         <actions>
1368                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1369                     <context link="event_def" field="owner"/>
1370                 </create>
1371                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1372                     <context link="event_def" field="owner"/>
1373                 </retrieve>
1374                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1375                     <context link="event_def" field="owner"/>
1376                 </update>
1377                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1378                     <context link="event_def" field="owner"/>
1379                 </delete>
1380                         </actions>
1381                 </permacrud>
1382         </class>
1383
1384         <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">
1385                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1386                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1387                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1388                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1389                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1390                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1391                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1392                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1393                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1394                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1395                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1396                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1397                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1398                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1399                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1400                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1401                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1402                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1403                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1404                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1405                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1406                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1407                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1408                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1409                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
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                 </fields>
1874                 <links>
1875                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1876                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1877                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1878                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1879                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1880                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1881                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1882                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1883                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1884                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1885                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1886                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1887                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1888             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1889                 </links>
1890         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1891             <actions>
1892                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1893                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1894                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1895                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1896             </actions>
1897         </permacrud>
1898         </class>
1899
1900         <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">
1901                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1902                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1903                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1904                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1905                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1906                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1907                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1908                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1909                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1910                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1911                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1912                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1913                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1914                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1915                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1916                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1917             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1918                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1919                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1920             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1921                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1922                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1923                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1924                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1925             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1926             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1927             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1928                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1929                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1930                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1931                 </fields>
1932                 <links>
1933                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1934                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1935                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1936                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1937                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1938                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1939                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1940                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1941                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1942                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1943                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1944                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1945                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1946                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1947             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1948                 </links>
1949         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1950             <actions>
1951                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1952                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1953                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1954                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1955             </actions>
1956         </permacrud>
1957         </class>
1958
1959     <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">
1960         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1961             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1962             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1963             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1964         </fields>
1965         <links/>
1966         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1967             <actions>
1968                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1969                 <retrieve/>
1970                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1971                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1972             </actions>
1973         </permacrud>
1974     </class>
1975
1976     <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">
1977         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1978             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1979             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1980             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1981             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1982             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1983             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1984             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1985         </fields>
1986         <links>
1987             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1988         </links>
1989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1990             <actions>
1991                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1992                 <retrieve/>
1993                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1994                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1995             </actions>
1996         </permacrud>
1997     </class>
1998
1999     <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">
2000         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2001             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2002             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2003             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2004             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2005             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2006         </fields>
2007         <links>
2008             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2009             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2010         </links>
2011         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2012             <actions>
2013                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2014                     <context link="matchpoint" field="org_unit"/>
2015                 </create>
2016                 <retrieve/>
2017                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2018                     <context link="matchpoint" field="org_unit"/>
2019                 </update>
2020                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2021                     <context link="matchpoint" field="org_unit"/>
2022                 </delete>
2023             </actions>
2024         </permacrud>
2025     </class>
2026
2027     <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">
2028         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2029             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2030             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2031             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2032         </fields>
2033         <links>
2034             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2035             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2036         </links>
2037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2038             <actions>
2039                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2040                     <context link="limit_set" field="owning_lib"/>
2041                 </create>
2042                 <retrieve/>
2043                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2044                     <context link="limit_set" field="owning_lib"/>
2045                 </update>
2046                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2047                     <context link="limit_set" field="owning_lib"/>
2048                 </delete>
2049             </actions>
2050         </permacrud>
2051     </class>
2052     <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">
2053         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2054             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2055             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2056             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2057         </fields>
2058         <links>
2059             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2060             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2061         </links>
2062         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2063             <actions>
2064                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2065                     <context link="limit_set" field="owning_lib"/>
2066                 </create>
2067                 <retrieve/>
2068                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2069                     <context link="limit_set" field="owning_lib"/>
2070                 </update>
2071                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2072                     <context link="limit_set" field="owning_lib"/>
2073                 </delete>
2074             </actions>
2075         </permacrud>
2076     </class>
2077
2078     <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">
2079         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2080             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2081             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2082             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2083             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2084         </fields>
2085         <links>
2086             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2087             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2088         </links>
2089         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2090             <actions>
2091                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2092                     <context link="limit_set" field="owning_lib"/>
2093                 </create>
2094                 <retrieve/>
2095                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2096                     <context link="limit_set" field="owning_lib"/>
2097                 </update>
2098                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2099                     <context link="limit_set" field="owning_lib"/>
2100                 </delete>
2101             </actions>
2102         </permacrud>
2103     </class>
2104
2105         <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">
2106                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2107                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2108                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2109                 </fields>
2110                 <links/>
2111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2112             <actions>
2113                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2114                 <retrieve/>
2115                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2116                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2117             </actions>
2118         </permacrud>
2119         </class>
2120
2121         <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">
2122                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2123                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2124                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2125                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2126                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2127                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2128                 </fields>
2129                 <links>
2130                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2131                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2132                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2133                 </links>
2134         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2135             <actions>
2136                 <create permission="ADMIN_SURVEY">
2137                     <context link="survey" field="owner"/>
2138                 </create>
2139                 <retrieve/>
2140                 <update permission="ADMIN_SURVEY">
2141                     <context link="survey" field="owner"/>
2142                 </update>
2143                 <delete permission="ADMIN_SURVEY">
2144                     <context link="survey" field="owner"/>
2145                 </delete>
2146             </actions>
2147         </permacrud>
2148         </class>
2149         <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">
2150                 <fields oils_persist:primary="id" oils_persist:sequence="">
2151                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2152                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2153                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2154                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2155                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2156                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2157                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2158                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2159                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2160                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2161                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2162                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2163                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2164                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2165                 </fields>
2166                 <links>
2167                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2168                 </links>
2169                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2170                         <actions>
2171                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2172                                         <context link="usr" field="home_ou" />
2173                                 </retrieve>
2174                         </actions>
2175                 </permacrud>
2176         </class>
2177         <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">
2178                 <fields oils_persist:primary="id" oils_persist:sequence="">
2179                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2180                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2181                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2182                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2183                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2184                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2185                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2186                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2187                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2188                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2189                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2190                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2191                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2192                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2193                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2194                 </fields>
2195                 <links>
2196                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2197                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2198                 </links>
2199         </class>
2200         <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">
2201                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2202                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2203                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2204                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2205                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2206                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2207                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2208                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2209                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2210                 </fields>
2211                 <links>
2212                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2213                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2214                 </links>
2215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2216                         <actions> <!-- created magically, so no create action -->
2217                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2218                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2219                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2220                         </actions>
2221                 </permacrud>
2222         </class>
2223         <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)">
2224                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2225                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2226                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2227                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2228                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2229                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2230                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2231                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2232                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2233                 </fields>
2234                 <links>
2235                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2236                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2237                 </links>
2238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2239                         <actions> <!-- created magically, so no create action -->
2240                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2241                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2242                         </actions>
2243                 </permacrud>
2244         </class>
2245         <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">
2246                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2247                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2248                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2249                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2250                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2251                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2252                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2253                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2254                 </fields>
2255                 <links>
2256                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2257                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2258                 </links>
2259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2260             <actions>
2261                 <create permission="UPDATE_USER" context_field="owner">
2262                     <context link="usr" field="home_ou"/>
2263                 </create>
2264                                 <!-- note: public notes are still accessible via API -->
2265                 <retrieve permission="UPDATE_USER">
2266                     <context link="usr" field="home_ou"/>
2267                                 </retrieve>
2268                 <update permission="UPDATE_USER">
2269                     <context link="usr" field="home_ou"/>
2270                                 </update>
2271                 <delete permission="UPDATE_USER">
2272                     <context link="usr" field="home_ou"/>
2273                                 </delete>
2274             </actions>
2275         </permacrud>
2276         </class>
2277         <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">
2278                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2279                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2280                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2281                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2282                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2283                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2284                 </fields>
2285                 <links>
2286                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2287                 </links>
2288         </class>
2289         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2290                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2291                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2292                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2293                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2294                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2295                 </fields>
2296                 <links>
2297                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2298                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2299                 </links>
2300         </class>
2301         <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">
2302                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2303                         <field name="field" reporter:datatype="link"/>
2304                         <field name="id" reporter:datatype="id" />
2305                         <field name="source" reporter:datatype="link"/>
2306                         <field name="value" reporter:datatype="text"/>
2307                 </fields>
2308                 <links>
2309                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2310                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2311                 </links>
2312         </class>
2313         <class id="aihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2314                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2315                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2316                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2317                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2318                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2319                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2320                 </fields>
2321                 <links>
2322                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2323                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2324                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2325                 </links>
2326         </class>
2327         <class id="ancihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2328                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2329                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2330                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2331                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2332                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2333                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2334                 </fields>
2335                 <links>
2336                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2337                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2338                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2339                 </links>
2340         </class>
2341         <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">
2342                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2343                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2344                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2345                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2346                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2347                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2348                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2349                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2350                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2351                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2352                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2353                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2354                 </fields>
2355                 <links>
2356                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2357                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2358                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2359                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2360                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2361                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2362                 </links>
2363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2364             <actions>
2365                 <create permission="TRANSIT_COPY" context_field="owner">
2366                     <context link="target_copy" field="circ_lib"/>
2367                 </create>
2368                 <retrieve/>
2369                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2370                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2371             </actions>
2372         </permacrud>
2373         </class>
2374         <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">
2375                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2376                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2377                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2378                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2379                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2380                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2381                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2382                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2383                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2384                 </fields>
2385                 <links>
2386                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2387                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2388                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2389                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2390                 </links>
2391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2392             <actions>
2393                 <create permission="ADMIN_SURVEY">
2394                     <context link="survey" field="owner"/>
2395                 </create>
2396                 <retrieve permission="VIEW_USER">
2397                     <context link="usr" field="home_ou"/>
2398                 </retrieve>
2399                 <update permission="ADMIN_SURVEY">
2400                     <context link="survey" field="owner"/>
2401                 </update>
2402                 <delete permission="ADMIN_SURVEY">
2403                     <context link="survey" field="owner"/>
2404                 </delete>
2405             </actions>
2406         </permacrud>
2407         </class>
2408         <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">
2409                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2410                         <field name="bucket" />
2411                         <field name="id" reporter:datatype="id" />
2412                         <field name="target_copy" reporter:datatype="link"/>
2413                         <field name="create_time" reporter:datatype="timestamp" />
2414                         <field name="pos" reporter:datatype="int" />
2415                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2416                 </fields>
2417                 <links>
2418                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2419                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2420             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2421                 </links>
2422         </class>
2423         <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">
2424                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2425                         <field name="id" reporter:datatype="id" />
2426                         <field name="item" reporter:datatype="link"/>
2427                         <field name="note" reporter:datatype="text" />
2428                 </fields>
2429                 <links>
2430                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2431                 </links>
2432         </class>
2433
2434         <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">
2435                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2436                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2437                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2438                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2439                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2440                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2441                 </fields>
2442                 <links>
2443                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2444                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2445                 </links>
2446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2447                         <actions>
2448                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2449                                 <retrieve/>
2450                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2451                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2452                         </actions>
2453                 </permacrud>
2454         </class>
2455
2456         <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">
2457                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2458                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2459                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2460                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2461                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2462                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2463                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2464                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2465                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2466                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2467                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2468                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2469                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2470                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2471                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2472                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2473                 </fields>
2474                 <links>
2475                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2476                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2477                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2478                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2479                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2480                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2481                 </links>
2482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2483                         <actions>
2484                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2485                                 <retrieve/>
2486                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2487                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2488                         </actions>
2489                 </permacrud>
2490         </class>
2491
2492         <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">
2493                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2494                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2495                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2496                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2497                 </fields>
2498                 <links>
2499                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2500                 </links>
2501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2502                         <actions>
2503                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2504                                 <retrieve/>
2505                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2506                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2507                         </actions>
2508                 </permacrud>
2509         </class>
2510
2511         <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">
2512                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2513                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2514                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2515                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2516                 </fields>
2517                 <links>
2518                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2519                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2520                 </links>
2521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2522                         <actions>
2523                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2524                                 <retrieve/>
2525                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2526                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2527                         </actions>
2528                 </permacrud>
2529         </class>
2530
2531         <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">
2532                 <fields oils_persist:primary="code">
2533                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2534                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2535                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2536                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2537                 </fields>
2538                 <links>
2539                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2540                 </links>
2541                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2542                         <actions>
2543                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2544                                 <retrieve/>
2545                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2546                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2547                         </actions>
2548                 </permacrud>
2549         </class>
2550
2551         <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">
2552                 <fields oils_persist:primary="code">
2553                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2554                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2555                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2556                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2557                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2558                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2559                 </fields>
2560                 <links>
2561                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2562                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2563                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2564                 </links>
2565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2566                         <actions>
2567                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2568                                 <retrieve/>
2569                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2570                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2571                         </actions>
2572                 </permacrud>
2573         </class>
2574
2575     <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">
2576         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2577             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2578             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2579             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2580         </fields>
2581         <links>
2582             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2583             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2584         </links>
2585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2586             <actions>
2587                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2588                 <retrieve/>
2589                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2590                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2591             </actions>
2592         </permacrud>
2593     </class>
2594
2595         <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">
2596                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2597                         <field name="active" reporter:datatype="bool"/>
2598                         <field name="create_date" reporter:datatype="timestamp"/>
2599                         <field name="creator" />
2600                         <field name="deleted" reporter:datatype="bool"/>
2601                         <field name="edit_date" reporter:datatype="timestamp"/>
2602                         <field name="editor" />
2603                         <field name="id" reporter:datatype="id" />
2604                         <field name="last_xact_id" />
2605                         <field name="marc" />
2606                         <field name="source" />
2607                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2608                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2609                         <field name="heading" />
2610                         <field name="simple_heading" />
2611                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2612                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2613                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2614                 </fields>
2615                 <links>
2616                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2617                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2618                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2619                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2620                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2621                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2622                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2623                 </links>
2624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2625                         <actions>
2626                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2627                                 <retrieve/>
2628                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2629                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2630                         </actions>
2631                 </permacrud>
2632         </class>
2633         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2634                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2635                         <field name="char_encoding" />
2636                         <field name="id" />
2637                         <field name="record" />
2638                         <field name="record_status" />
2639                         <field name="thesaurus" />
2640                 </fields>
2641                 <links>
2642                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2643                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2644                 </links>
2645         </class>
2646         <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">
2647                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2648                         <field name="id" reporter:datatype="id" />
2649                         <field name="bib" reporter:datatype="link" />
2650                         <field name="authority" reporter:datatype="link" />
2651                 </fields>
2652                 <links>
2653                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2654                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2655                 </links>
2656         </class>
2657         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2658                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2659                         <field name="id" reporter:datatype="id" />
2660                         <field name="record" reporter:datatype="link" />
2661                         <field name="atag" reporter:datatype="link" />
2662                         <field name="value" reporter:datatype="text" />
2663                 </fields>
2664                 <links>
2665                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2666                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2667                 </links>
2668         </class>
2669         <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">
2670                 <fields oils_persist:primary="code" oils_persist:sequence="">
2671                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2672                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2673                 </fields>
2674                 <links/>
2675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2676             <actions>
2677                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2678                 <retrieve/>
2679                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2680                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2681             </actions>
2682         </permacrud>
2683         </class>
2684         <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">
2685                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2686                         <field name="accepting_usr" />
2687                         <field name="amount" reporter:datatype="money" />
2688                         <field name="amount_collected" reporter:datatype="money" />
2689                         <field name="approval_code" reporter:datatype="text"/>
2690                         <field name="cash_drawer" reporter:datatype="link"/>
2691                         <field name="cc_number" reporter:datatype="text"/>
2692                         <field name="cc_order_number" reporter:datatype="text"/>
2693                         <field name="cc_processor" reporter:datatype="text"/>
2694                         <field name="id" reporter:datatype="id" />
2695                         <field name="note" reporter:datatype="text"/>
2696                         <field name="payment_ts" reporter:datatype="timestamp"/>
2697                         <field name="xact" reporter:datatype="link"/>
2698                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2699                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2700                 </fields>
2701                 <links>
2702                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2703                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2704                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2705                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2706                 </links>
2707         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2708             <actions>
2709                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2710                     <context link="xact" jump="usr" field="home_ou"/>
2711                 </retrieve>
2712                         </actions>
2713                 </permacrud>
2714         </class>
2715         <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">
2716                 <fields oils_persist:primary="name">
2717                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2718                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2719                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2720                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2721                 </fields>
2722                 <links/>
2723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2724             <actions>
2725                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2726                 <retrieve/>
2727                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2728                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2729             </actions>
2730         </permacrud>
2731         </class>
2732
2733         <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">
2734                 <fields oils_persist:primary="alias">
2735                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2736                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2737                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2738                 </fields>
2739                 <links>
2740                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2741                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2742                 </links>
2743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2744             <actions>
2745                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2746                 <retrieve/>
2747                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2748                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2749             </actions>
2750         </permacrud>
2751         </class>
2752
2753         <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">
2754                 <fields oils_persist:primary="name">
2755                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2756                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2757                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2758                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2759                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2760                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2761                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2762                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2763                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2764                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2765                 </fields>
2766                 <links>
2767                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2768                 </links>
2769         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2770             <actions>
2771                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2772                 <retrieve/>
2773                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2774                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2775             </actions>
2776         </permacrud>
2777         </class>
2778
2779         <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">
2780                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2781                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2782                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2783                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2784                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2785                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2786                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2787                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2788                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2789                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2790                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2791                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2792                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2793                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2794                 </fields>
2795                 <links>
2796                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2797                 </links>
2798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2799             <actions>
2800                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2801                 <retrieve/>
2802                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2803                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2804             </actions>
2805         </permacrud>
2806         </class>
2807         <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">
2808                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2809                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2810                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2811                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2812                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2813                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2814                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2815                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2816                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2817                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2818                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2819                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2820                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2821                 </fields>
2822                 <links>
2823                 </links>
2824                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2825                         <actions>
2826                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2827                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2828                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2829                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2830                         </actions>
2831                 </permacrud>
2832         </class>
2833         <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">
2834                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2835                         <field name="id" reporter:datatype="id" />
2836                         <field name="name" reporter:datatype="text"/>
2837                         <field name="xpath" reporter:datatype="text"/>
2838                         <field name="format" reporter:datatype="link"/>
2839                         <field name="first_word" reporter:datatype="bool" />
2840                 </fields>
2841                 <links/>
2842         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2843             <actions>
2844                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2845                 <retrieve/>
2846                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2847                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2848             </actions>
2849         </permacrud>
2850         </class>
2851         <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">
2852                 <fields oils_persist:primary="code" oils_persist:sequence="">
2853                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2854                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2855                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2856                 </fields>
2857                 <links/>
2858         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2859             <actions>
2860                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2861                 <retrieve/>
2862                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2863                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2864             </actions>
2865         </permacrud>
2866         </class>
2867         <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">
2868                 <fields oils_persist:primary="code" oils_persist:sequence="">
2869                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2870                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2871                 </fields>
2872                 <links/>
2873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2874             <actions>
2875                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2876                 <retrieve/>
2877                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2878                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2879             </actions>
2880         </permacrud>
2881         </class>
2882     <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">
2883         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2884             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2885             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2886             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2887             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2888         </fields>
2889         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2890             <actions>
2891                 <retrieve/>
2892             </actions>
2893         </permacrud>
2894     </class>
2895         <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">
2896                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2897                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2898                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2899                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2900                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2901                 </fields>
2902                 <links>
2903                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2904                 </links>
2905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2906             <actions>
2907                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2908                 <retrieve/>
2909                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2910                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2911             </actions>
2912         </permacrud>
2913         </class>
2914         <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">
2915                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2916                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2917                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2918                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2919                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2920                 </fields>
2921                 <links>
2922                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2923                 </links>
2924         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2925             <actions>
2926                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2927                 <retrieve/>
2928                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2929                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2930             </actions>
2931         </permacrud>
2932         </class>
2933         <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">
2934                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2935                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2936                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2937                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2938                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2939                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2940                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2941                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2942                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2943                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2944                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2945                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2946                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2947                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2948                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2949                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2950                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2951                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2952                 </fields>
2953                 <links>
2954                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2955                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2956                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2957                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2958                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2959                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2960                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2961                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2962                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2963                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2964                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2965                 </links>
2966         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2967             <actions>
2968                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2969                 <retrieve/>
2970                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2971                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2972             </actions>
2973         </permacrud>
2974         </class>
2975         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2976                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2977                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2978                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2979                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2980                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2981                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2982                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2983                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2984                 </fields>
2985                 <links>
2986                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2987                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2988         </links>
2989         </class>
2990         <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">
2991                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2992                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2993                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2994                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2995                 </fields>
2996                 <links>
2997                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2998                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2999                 </links>
3000         </class>
3001         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3002                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3003                         <field name="id" reporter:datatype="id" />
3004                         <field name="value" oils_persist:i18n="true" />
3005                 </fields>
3006                 <links/>
3007         </class>
3008         <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">
3009                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3010                         <field name="balance_owed" reporter:datatype="money" />
3011                         <field name="total_owed" reporter:datatype="money" />
3012                         <field name="total_paid" reporter:datatype="money" />
3013                         <field name="usr" reporter:datatype="link"/>
3014                 </fields>
3015                 <links>
3016                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3017         </links>
3018         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3019             <actions>
3020                 <retrieve permission="VIEW_USER">
3021                     <context link="usr" field="home_ou"/>
3022                 </retrieve>
3023             </actions>
3024         </permacrud>
3025         </class>
3026         <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">
3027                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3028                         <field name="collector" />
3029                         <field name="enter_time" reporter:datatype="timestamp"/>
3030                         <field name="id" reporter:datatype="id" />
3031                         <field name="location" reporter:datatype="link"/>
3032                         <field name="usr" reporter:datatype="link"/>
3033                 </fields>
3034                 <links>
3035                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3036                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3037                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3038                 </links>
3039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3040             <actions>
3041                 <create permission="money.collections_tracker.create" context_field="location"/>
3042                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3043                 <delete permission="money.collections_tracker.create" context_field="location"/>
3044             </actions>
3045         </permacrud>
3046         </class>
3047         <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">
3048                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3049                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3050                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3051                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3052                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3053                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3054                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3055                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3056                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3057                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3058                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3059                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3060                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3061                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3062                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3063                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3064                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3065                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3066                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3067                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3068                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3069                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3070                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3071                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3072                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3073                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3074                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3075                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3076                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3077                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3078                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3079                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3080                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3081                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3082                 </fields>
3083                 <links>
3084                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3085                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3086                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3087                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3088                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3089                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3090                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3091                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3092                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3093                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3094                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3095                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3096                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3097                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3098                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3099                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3100                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3101                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3102                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3103                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3104                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3105                 </links>
3106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3107             <actions>
3108                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3109                 <retrieve/>
3110                 <update permission="UPDATE_MARC" global_required="true"/>
3111                 <!-- 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. -->
3112                 <delete permission="DELETE_RECORD" global_required="true"/>
3113             </actions>
3114         </permacrud>
3115         </class>
3116         <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">
3117                 <fields oils_persist:primary="id">
3118                         <field name="dow_0_close" />
3119                         <field name="dow_0_open" />
3120                         <field name="dow_1_close" />
3121                         <field name="dow_1_open" />
3122                         <field name="dow_2_close" />
3123                         <field name="dow_2_open" />
3124                         <field name="dow_3_close" />
3125                         <field name="dow_3_open" />
3126                         <field name="dow_4_close" />
3127                         <field name="dow_4_open" />
3128                         <field name="dow_5_close" />
3129                         <field name="dow_5_open" />
3130                         <field name="dow_6_close" />
3131                         <field name="dow_6_open" />
3132                         <field name="id" reporter:datatype="id" />
3133                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3134                 </fields>
3135                 <links>
3136                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3137                 </links>
3138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3139             <actions>
3140                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3141                 <retrieve/>
3142                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3143                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3144             </actions>
3145         </permacrud>
3146         </class>
3147         <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">
3148                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3149                         <field name="id" reporter:datatype="id" />
3150                         <field name="record" reporter:datatype="link"/>
3151                         <field name="label" reporter:datatype="text"/>
3152                         <field name="label_sortkey" reporter:datatype="text"/>
3153                         <field name="deleted" reporter:datatype="bool"/>
3154                 </fields>
3155                 <links>
3156                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3157                 </links>
3158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3159             <actions>
3160                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3161                 <retrieve/>
3162                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3163                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3164             </actions>
3165         </permacrud>
3166         </class>
3167         <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">
3168                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3169                         <field name="id" reporter:datatype="id" />
3170                         <field name="target_copy" reporter:datatype="link" />
3171                         <field name="part" reporter:datatype="link"/>
3172                 </fields>
3173                 <links>
3174                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3175                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3176                 </links>
3177         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3178             <actions>
3179                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3180                 <retrieve/>
3181                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3182                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3183             </actions>
3184         </permacrud>
3185         </class>
3186         <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">
3187                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3188                         <field name="close_end" reporter:datatype="timestamp" />
3189                         <field name="close_start" reporter:datatype="timestamp" />
3190                         <field name="id" reporter:datatype="id" />
3191                         <field name="org_unit" reporter:datatype="org_unit"/>
3192                         <field name="reason" reporter:datatype="text"/>
3193                 </fields>
3194                 <links>
3195                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3196                 </links>
3197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3198             <actions>
3199                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3200                 <retrieve/>
3201                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3202                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3203             </actions>
3204         </permacrud>
3205         </class>
3206         <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">
3207                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3208                         <field name="extended" reporter:datatype="interval"/>
3209                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3210                         <field name="max_renewals" reporter:datatype="int" />
3211                         <field name="name" reporter:datatype="text"/>
3212                         <field name="normal" reporter:datatype="interval"/>
3213                         <field name="shrt" reporter:datatype="interval"/>
3214                 </fields>
3215                 <links>
3216                 </links>
3217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3218             <actions>
3219                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3220                 <retrieve/>
3221                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3222                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3223             </actions>
3224         </permacrud>
3225         </class>
3226
3227         <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">
3228                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3229                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3230                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3231             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3232                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3233             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3234                 </fields>
3235                 <links>
3236             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3237                 </links>
3238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3239             <actions>
3240                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3241                 <retrieve/>
3242                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3243                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3244             </actions>
3245                 </permacrud>
3246         </class>
3247
3248         <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">
3249                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3250                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3251                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3252                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3253             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3254                 </fields>
3255                 <links>
3256                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3257                 </links>
3258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3259             <actions>
3260                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3261                 <retrieve/>
3262                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3263                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3264             </actions>
3265                 </permacrud>
3266         </class>
3267
3268         <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">
3269                 <fields oils_persist:primary="id" oils_persist:sequence="">
3270                         <field name="balance_owed" reporter:datatype="money"/>
3271                         <field name="id" reporter:datatype="id" />
3272                         <field name="last_billing_note" reporter:datatype="text"/>
3273                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3274                         <field name="last_billing_type" reporter:datatype="text"/>
3275                         <field name="last_payment_note" reporter:datatype="text"/>
3276                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3277                         <field name="last_payment_type" reporter:datatype="text"/>
3278                         <field name="total_owed" reporter:datatype="money"/>
3279                         <field name="total_paid" reporter:datatype="money"/>
3280                         <field name="usr" reporter:datatype="link"/>
3281                         <field name="xact_finish" reporter:datatype="timestamp" />
3282                         <field name="xact_start" reporter:datatype="timestamp" />
3283                         <field name="xact_type" reporter:datatype="text"/>
3284                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3285                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3286                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3287                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3288                         <field name="billing_location" reporter:datatype="link"/>
3289                 </fields>
3290                 <links>
3291                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3292                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3293                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3294                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3295                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3296                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3297                 </links>
3298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3299                         <actions>
3300                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3301                                         <context link="usr" field="home_ou" />
3302                                 </retrieve>
3303                         </actions>
3304                 </permacrud>
3305         </class>
3306         <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">
3307                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3308                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3309                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3310                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3311                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3312                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3313                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3314                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3315                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3316                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3317                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3318                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3319                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3320                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3321                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3322                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3323                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3324                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3325                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3326                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3327                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3328                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3329                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3330                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3331                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3332                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3333                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3334                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3335                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3336                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3337                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3338                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3339                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3340                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3341                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3342                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3343                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3344                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3345                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3346                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3347                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3348                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3349                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3350                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3351                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3352                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3353                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3354                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3355                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3356                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3357                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3358                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3359                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3360                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3361                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3362                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3363                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3364                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3365                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3366                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3367                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3368                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3369                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3370                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3371                 </fields>
3372                 <links>
3373                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3374                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3375                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3376                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3377                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3378                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3379                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3380                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3381                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3382                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3383                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3384                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3385                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3386                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3387                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3388                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3389                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3390                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3391                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3392                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3393                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3394                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3395                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3396                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3397                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3398                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3399                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3400                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3401                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3402                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3403                 </links>
3404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3405                         <actions>
3406                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3407                         </actions>
3408                 </permacrud>
3409         </class>
3410         <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">
3411                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3412                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3413                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3414                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3415                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3416                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3417                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3418                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3419                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3420         </fields>
3421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3422                         <actions>
3423                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3424                                 <retrieve/>
3425                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3426                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3427                         </actions>
3428                 </permacrud>
3429         </class>
3430         <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">
3431                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3432                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3433                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3434                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3435                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3436         </fields>
3437         <links>
3438                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3439                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3440                 </links>
3441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3442                         <actions>
3443                                 <retrieve permission="RUN_REPORTS">
3444                                         <context link="usr" field="home_ou" />
3445                                 </retrieve>
3446                         </actions>
3447                 </permacrud>
3448         </class>
3449         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3450                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3451                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3452                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3453                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3454                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3455                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3456                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3457         </fields>
3458         <links>
3459                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3460                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3461                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3462                 </links>
3463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3464                         <actions>
3465                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3466                                         <context link="usr" field="home_ou" />
3467                                         <context link="ws" field="owning_lib" />
3468                                 </retrieve>
3469                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3470                                         <context link="usr" field="home_ou" />
3471                                         <context link="ws" field="owning_lib" />
3472                                 </create>
3473                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3474                                         <context link="usr" field="home_ou" />
3475                                         <context link="ws" field="owning_lib" />
3476                                 </update>
3477                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3478                                         <context link="usr" field="home_ou" />
3479                                         <context link="ws" field="owning_lib" />
3480                                 </delete>
3481                         </actions>
3482                 </permacrud>
3483         </class>
3484         <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">
3485                 <fields oils_persist:primary="name">
3486                         <field name="name" reporter:datatype="text"/>
3487                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3488                 </fields>
3489                 <links/>
3490                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3491                         <actions>
3492                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3493                                 <retrieve/>
3494                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3495                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3496                         </actions>
3497                 </permacrud>
3498         </class>
3499         <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">
3500                 <fields oils_persist:primary="name">
3501                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3502                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3503                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3504                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3505                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3506                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3507                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3508                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3509                 </fields>
3510                 <links>
3511                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3512                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3513                 </links>
3514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3515                         <actions>
3516                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3517                                 <retrieve/>
3518                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3519                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3520                         </actions>
3521                 </permacrud>
3522         </class>
3523         <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">
3524                 <fields oils_persist:primary="name">
3525                         <field name="name" reporter:datatype="text"/>
3526                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3527                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3528                         <field name="datatype" reporter:datatype="text"/>
3529                         <field name="view_perm" reporter:datatype="link"/>
3530                         <field name="update_perm" reporter:datatype="link"/>
3531                         <field name="fm_class" reporter:datatype="text"/>
3532                         <field name="grp" reporter:datatype="link"/>
3533                 </fields>
3534                 <links>
3535                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3536                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3537                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3538                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3539                 </links>
3540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3541                         <actions>
3542                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3543                                 <retrieve/>
3544                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3545                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3546                         </actions>
3547                 </permacrud>
3548         </class>
3549         <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">
3550                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3551                         <field name="id" />
3552                         <field name="name"  reporter:datatype="text"/>
3553                         <field name="org_unit" reporter:datatype="org_unit"/>
3554                         <field name="value"  reporter:datatype="text"/>
3555                 </fields>
3556                 <links>
3557                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3558                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3559                 </links>
3560         </class>
3561         <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">
3562                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3563                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3564                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3565                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3566                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3567                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3568                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3569                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3570                 </fields>
3571                 <links>
3572                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3573                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3574                 </links>
3575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3576             <actions>
3577                 <create permission="CREATE_COPY_NOTE">
3578                     <context link="owning_copy" field="circ_lib"/>
3579                 </create>
3580                 <retrieve permission="VIEW_COPY_NOTES">
3581                     <context link="owning_copy" field="circ_lib"/>
3582                 </retrieve>
3583                 <update permission="UPDATE_COPY_NOTE">
3584                     <context link="owning_copy" field="circ_lib"/>
3585                 </update>
3586                 <delete permission="DELETE_COPY_NOTE">
3587                     <context link="owning_copy" field="circ_lib"/>
3588                 </delete>
3589             </actions>
3590         </permacrud>
3591         </class>
3592         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3593                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3594                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3595                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3596                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3597                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3598                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3599                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3600                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3601                 </fields>
3602                 <links>
3603                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3604                 </links>
3605         </class>
3606         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3607                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3608                         <field name="fingerprint"  reporter:datatype="text"/>
3609                         <field name="id" reporter:datatype="id" />
3610                         <field name="master_record" reporter:datatype="link"/>
3611                         <field name="mods"  reporter:datatype="text"/>
3612                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3613                 </fields>
3614                 <links>
3615                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3616                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3617                 </links>
3618         </class>
3619         <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">
3620                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3621                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3622                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3623                 </fields>
3624                 <links/>
3625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3626             <actions>
3627                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3628                 <retrieve/>
3629                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3630                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3631             </actions>
3632         </permacrud>
3633         </class>
3634         <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">
3635                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3636                         <field name="code"  reporter:datatype="text"/>
3637                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3638                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3639                 </fields>
3640                 <links/>
3641         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3642             <actions>
3643                 <create permission="CREATE_PERM" global_required="true"/>
3644                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3645                 <update permission="UPDATE_PERM" global_required="true"/>
3646                 <delete permission="DELETE_PERM" global_required="true"/>
3647             </actions>
3648         </permacrud>
3649         </class>
3650         <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">
3651                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3652                         <field name="id" reporter:datatype="id" />
3653                         <field name="metarecord" reporter:datatype="link"/>
3654                         <field name="source" reporter:datatype="link"/>
3655                 </fields>
3656                 <links>
3657                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3658                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3659                 </links>
3660         </class>
3661         <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">
3662                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3663                         <field name="id" reporter:datatype="id" />
3664                         <field name="field" reporter:datatype="link"/>
3665                         <field name="source" reporter:datatype="link"/>
3666                         <field name="value"  reporter:datatype="text"/>
3667                 </fields>
3668                 <links>
3669                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3670                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3671                 </links>
3672         </class>
3673         <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">
3674                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3675                         <field name="id" reporter:datatype="id" />
3676                         <field name="value" reporter:datatype="text"/>
3677                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3678                 </fields>
3679                 <links>
3680                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3681                 </links>
3682         </class>
3683         <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">
3684                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3685                         <field name="id" reporter:datatype="id" />
3686                         <field name="entry" reporter:datatype="link"/>
3687                         <field name="def" reporter:datatype="link"/>
3688                         <field name="source" reporter:datatype="link"/>
3689                 </fields>
3690                 <links>
3691                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3692                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3693                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3694                 </links>
3695         </class>
3696         <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">
3697                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3698                         <field name="id" reporter:datatype="id" />
3699                         <field name="entry" reporter:datatype="link"/>
3700                         <field name="simple_heading" reporter:datatype="link"/>
3701                 </fields>
3702                 <links>
3703                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3704                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3705                 </links>
3706         </class>
3707         <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">
3708                 <oils_persist:source_definition>
3709                         SELECT * FROM metabib.author_field_entry
3710                                                 UNION ALL
3711                         SELECT * FROM metabib.keyword_field_entry
3712                                                 UNION ALL
3713                         SELECT * FROM metabib.identifier_field_entry
3714                                                 UNION ALL
3715                         SELECT * FROM metabib.title_field_entry
3716                                                 UNION ALL
3717                         SELECT * FROM metabib.subject_field_entry
3718                                                 UNION ALL
3719                         SELECT * FROM metabib.series_field_entry
3720                 </oils_persist:source_definition>
3721                 <fields>
3722                         <field name="field" reporter:datatype="link"/>
3723                         <field name="id" reporter:datatype="id" />
3724                         <field name="source" reporter:datatype="link"/>
3725                         <field name="value"  reporter:datatype="text"/>
3726                 </fields>
3727                 <links>
3728                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3729                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3730                 </links>
3731         </class>
3732         <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">
3733                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3734                         <field name="field" reporter:datatype="link"/>
3735                         <field name="id" reporter:datatype="id" />
3736                         <field name="source" reporter:datatype="link"/>
3737                         <field name="value"  reporter:datatype="text"/>
3738                 </fields>
3739                 <links>
3740                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3741                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3742                 </links>
3743         </class>
3744         <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">
3745                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3746                         <field name="accepting_usr" reporter:datatype="link"/>
3747                         <field name="amount" reporter:datatype="money" />
3748                         <field name="amount_collected" reporter:datatype="money" />
3749                         <field name="cash_drawer" reporter:datatype="link"/>
3750                         <field name="id" reporter:datatype="id" />
3751                         <field name="note"  reporter:datatype="text"/>
3752                         <field name="payment_ts" reporter:datatype="timestamp"/>
3753                         <field name="xact" reporter:datatype="link"/>
3754                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3755                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3756                 </fields>
3757                 <links>
3758                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3759                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3760                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3761                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3762                 </links>
3763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3764             <actions>
3765                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3766                     <context link="xact" jump="usr" field="home_ou"/>
3767                 </retrieve>
3768                         </actions>
3769                 </permacrud>
3770         </class>
3771         <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">
3772                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3773                         <field name="accepting_usr" reporter:datatype="link"/>
3774                         <field name="amount" reporter:datatype="money" />
3775                         <field name="amount_collected" reporter:datatype="money" />
3776                         <field name="id" reporter:datatype="id" />
3777                         <field name="note"  reporter:datatype="text"/>
3778                         <field name="payment_ts" reporter:datatype="timestamp"/>
3779                         <field name="xact" reporter:datatype="link"/>
3780                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3781                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3782                 </fields>
3783                 <links>
3784                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3785                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3786                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3787                 </links>
3788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3789             <actions>
3790                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3791                     <context link="xact" jump="usr" field="home_ou"/>
3792                 </retrieve>
3793                         </actions>
3794                 </permacrud>
3795         </class>
3796         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3797                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3798                         <field name="accepting_usr" reporter:datatype="link"/>
3799                         <field name="amount" reporter:datatype="money" />
3800                         <field name="amount_collected" reporter:datatype="money" />
3801                         <field name="id" reporter:datatype="id" />
3802                         <field name="note"  reporter:datatype="text"/>
3803                         <field name="payment_ts" reporter:datatype="timestamp"/>
3804                         <field name="xact" reporter:datatype="link"/>
3805                         <field name="billing" reporter:datatype="link"/>
3806                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3807                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3808                 </fields>
3809                 <links>
3810                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3811                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3812                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3813                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3814                 </links>
3815         </class>
3816         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3817                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3818                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3819                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3820                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3821                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3822                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3823                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3824                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3825                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3826                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3827                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3828                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3829                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3830                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3831                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3832                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3833                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3834                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3835                 </fields>
3836                 <links>
3837                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3838                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3839                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3840                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3841                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3842                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3843                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3844                 </links>
3845         </class>
3846
3847         <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">
3848                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3849                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3850                         <field name="name"  reporter:datatype="text"/>
3851                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3852                         <field name="block_list" reporter:datatype="text"/>
3853                         <field name="staff_alert" reporter:datatype="bool"/>
3854                         <field name="org_depth" reporter:datatype="int"/>
3855                         <field name="ignore_proximity" reporter:datatype="int"/>
3856                 </fields>
3857                 <links/>
3858         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3859             <actions>
3860                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3861                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3862                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3863                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3864             </actions>
3865         </permacrud>
3866         </class>
3867         <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">
3868                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3869                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3870                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3871                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3872                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3873                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3874                 </fields>
3875                 <links>
3876                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3877                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3878                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3879         </links>
3880         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3881             <actions>
3882                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3883                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3884                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3885                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3886             </actions>
3887         </permacrud>
3888         </class>
3889         <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">
3890                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3891                         <field name="holdable" reporter:datatype="bool"/>
3892                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3893                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3894                         <field name="opac_visible" reporter:datatype="bool"/>
3895             <field name="copy_active" reporter:datatype="bool"/>
3896             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3897             <field name="is_available" reporter:datatype="bool"/>
3898                 </fields>
3899                 <links/>
3900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3901             <actions>
3902                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3903                 <retrieve/>
3904                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3905                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3906             </actions>
3907         </permacrud>
3908         </class>
3909         <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">
3910                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3911                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3912                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3913                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3914                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3915                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3916                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3917                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3918                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3919                 </fields>
3920                 <links>
3921                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3922                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3923                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3924                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3925                 </links>
3926                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3927                         <actions>
3928                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3929                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3930                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3931                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3932                         </actions>
3933                 </permacrud>
3934         </class>
3935         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3936                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3937                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3938                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3939                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3940                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3941                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3942                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3943                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3944                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3945                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3946                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3947                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3948                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3949                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3950                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3951                 </fields>
3952                 <links>
3953                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3954                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3955                 </links>
3956         </class>
3957         <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">
3958                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3959                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3960                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3961                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3962                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3963                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3964                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3965                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3966                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3967                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3968                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3969                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3970                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3971                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3972                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3973                 </fields>
3974                 <links>
3975                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3976                 </links>
3977                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3978                         <actions>
3979                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3980                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3981                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3982                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3983                         </actions>
3984                 </permacrud>
3985         </class>
3986
3987
3988         <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">
3989                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3990                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3991                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3992                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3993                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3994                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3995                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3996                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3997                 </fields>
3998                 <links>
3999                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4000                 </links>
4001         </class>
4002
4003         <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">
4004                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4005                         <field name="call_number" />
4006                         <field name="create_date" reporter:datatype="timestamp"/>
4007                         <field name="creator" reporter:datatype="link"/>
4008                         <field name="id" reporter:datatype="id" />
4009                         <field name="pub" reporter:datatype="bool"/>
4010                         <field name="title"  reporter:datatype="text"/>
4011                         <field name="value"  reporter:datatype="text"/>
4012                 </fields>
4013                 <links>
4014                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4015                 </links>
4016         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4017             <actions>
4018                 <create permission="CREATE_VOLUME_NOTE">
4019                     <context link="call_number" field="owning_lib"/>
4020                 </create>
4021                 <retrieve permission="VIEW_VOLUME_NOTES">
4022                     <context link="call_number" field="owning_lib"/>
4023                 </retrieve>
4024                 <update permission="UPDATE_VOLUME_NOTE">
4025                     <context link="call_number" field="owning_lib"/>
4026                 </update>
4027                 <delete permission="DELETE_VOLUME_NOTE">
4028                     <context link="call_number" field="owning_lib"/>
4029                 </delete>
4030             </actions>
4031         </permacrud>
4032         </class>
4033         <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">
4034                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4035                         <field name="create_date" reporter:datatype="timestamp"/>
4036                         <field name="creator" reporter:datatype="link"/>
4037                         <field name="edit_date" reporter:datatype="timestamp"/>
4038                         <field name="editor" reporter:datatype="link"/>
4039                         <field name="id" reporter:datatype="id" />
4040                         <field name="record" reporter:datatype="link"/>
4041                         <field name="value" reporter:datatype="text"/>
4042                 </fields>
4043                 <links>
4044                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4045                 </links>
4046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4047             <actions>
4048                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4049                 <retrieve/>
4050                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4051                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4052             </actions>
4053         </permacrud>
4054         </class>
4055         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4056         <oils_persist:source_definition>
4057 SELECT  usr,
4058         SUM(
4059             CASE
4060                 WHEN (
4061                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4062                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4063                 ) THEN 1
4064                 ELSE 0
4065             END
4066         ) AS out,
4067
4068         SUM(
4069             CASE
4070                 WHEN (
4071                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4072                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4073                 ) THEN 1
4074                 ELSE 0
4075             END
4076         ) AS overdue,
4077
4078         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4079         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4080         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4081   FROM  action.circulation
4082   WHERE checkin_time IS NULL
4083   GROUP BY 1
4084         </oils_persist:source_definition>
4085         <fields oils_persist:primary="usr">
4086             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4087             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4088             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4089             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4090             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4091             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4092         </fields>
4093         <links>
4094             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4095         </links>
4096         </class>
4097         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4098         <oils_persist:source_definition>
4099 SELECT  usr,
4100         STRING_AGG(
4101             CASE
4102                 WHEN (
4103                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4104                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4105                 ) THEN id::TEXT
4106                 ELSE '0'
4107             END
4108         ,',') AS out,
4109
4110         STRING_AGG(
4111             CASE
4112                 WHEN (
4113                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4114                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4115                 ) THEN id::TEXT
4116                 ELSE '0'
4117             END
4118         ,',') AS overdue,
4119
4120         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4121         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4122         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4123   FROM  action.circulation
4124   WHERE checkin_time IS NULL
4125   GROUP BY 1
4126         </oils_persist:source_definition>
4127         <fields oils_persist:primary="usr">
4128             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4129             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4130             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4131             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4132             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4133             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4134         </fields>
4135         <links>
4136             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4137         </links>
4138         </class>
4139         <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">
4140                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4141                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4142                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4143                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4144                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4145                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4146                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4147                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4148                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4149                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4150                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4151                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4152                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4153                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4154                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4155                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4156                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4157                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4158                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4159                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4160                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4161                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4162                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4163                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4164                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4165                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4166                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4167                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4168                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4169                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4170                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4171                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4172                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4173                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4174                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4175                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4176                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4177                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4178                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4179                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4180                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4181                 </fields>
4182                 <links>
4183                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4184                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4185                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4186                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4187                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4188                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4189                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4190                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4191                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4192                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4193                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4194                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4195                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4196                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4197                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4198                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4199                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4200                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4201                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4202                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4203                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4204                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4205                 </links>
4206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4207                         <actions>
4208                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4209                         </actions>
4210                 </permacrud>
4211         </class>
4212         <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">
4213                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4214                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4215                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4216                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4217                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4218                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4219                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4220                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4221                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4222                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4223                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4224                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4225                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4226                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4227                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4228                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4229                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4230                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4231                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4232                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4233                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4234                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4235                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4236                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4237                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4238                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4239                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4240                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4241                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4242                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4243                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4244                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4245                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4246                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4247                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4248                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4249                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4250                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4251                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4252                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4253                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4254                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4255                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4256                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4257                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4258                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4259                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4260                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4261                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4262                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4263                 </fields>
4264                 <links>
4265                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4266                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4267                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4268                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4269                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4270                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4271                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4272                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4273                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4274                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4275                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4276                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4277                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4278                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4279                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4280                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4281                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4282                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4283                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4284                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4285                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4286                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4287                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4288                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4289                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4290                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4291                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4292                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4293                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4294                 </links>
4295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4296                         <actions>
4297                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4298                         </actions>
4299                 </permacrud>
4300         </class>
4301         <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">
4302                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4303                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4304                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4305                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4306                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4307                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4308                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4309                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4310                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4311                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4312                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4313                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4314                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4315                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4316                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4317                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4318                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4319                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4320                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4321                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4322                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4323                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4324                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4325                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4326                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4327                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4328                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4329                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4330                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4331                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4332                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4333                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4334                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4335                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4336                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4337                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4338                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4339                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4340                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4341                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4342                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4343                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4344                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4345                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4346                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4347                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4348                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4349                 </fields>
4350                 <links>
4351                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4352                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4353                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4354                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4355                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4356                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4357                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4358                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4359                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4360                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4361                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4362                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4363                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4364                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4365                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4366                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4367                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4368                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4369                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4370                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4371                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4372                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4373                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4374                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4375                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4376                 </links>
4377         </class>
4378         <class id="auch" 
4379                 controller="open-ils.cstore" 
4380                 oils_obj:fieldmapper="action::user_circ_history" 
4381                 oils_persist:tablename="action.usr_circ_history" 
4382                 reporter:label="User Checkout History">
4383                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4384                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4385                         <!-- prevent reporting on the user that owns the checkout history -->
4386                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4387                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4388                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4389                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4390                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4391                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4392                 </fields>
4393                 <links>
4394                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4395                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4396                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4397                 </links>
4398         </class>
4399         <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">
4400                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4401                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4402                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4403                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4404                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4405                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4406                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4407                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4408                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4409                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4410                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4411                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4412                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4413                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4414                 </fields>
4415                 <links>
4416                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4417                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4418                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4419                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4420                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4421                 </links>
4422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4423                         <actions>
4424                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4425                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4426                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4427                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4428                         </actions>
4429                 </permacrud>
4430         </class>
4431
4432         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4433                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4434                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4435                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4436                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4437                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4438                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4439                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4440                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4441                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4442                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4443                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4444                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4445                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4446                 </fields>
4447                 <links>
4448                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4449                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4450                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4451                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4452                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4453                 </links>
4454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4455                         <actions>
4456                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4457                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4458                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4459                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4460                         </actions>
4461                 </permacrud>
4462         </class>
4463         
4464         <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">
4465                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4466                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4467                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4468                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4469                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4470                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4471                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4472                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4473                 </fields>
4474                 <links>
4475                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4476                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4477                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4478                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4479                 </links>
4480                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4481                         <actions>
4482                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4483                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4484                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4485                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4486                         </actions>
4487                 </permacrud>
4488         </class>
4489         
4490         <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">
4491                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4492                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4493                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4494                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4495                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4496                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4497                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4498                 </fields>
4499                 <links>
4500                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4501                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4502                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4503                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4504                 </links>
4505                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4506                         <actions>
4507                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4508                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4509                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4510                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4511                         </actions>
4512                 </permacrud>
4513         </class>
4514         
4515         <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">
4516                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4517                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4518                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4519                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4520                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4521                 </fields>
4522                 <links>
4523                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4524                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4525                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4526                 </links>
4527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4528                         <actions>
4529                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4530                     <context link="resource" field="owner" />
4531                 </create>
4532                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4533                     <context link="resource" field="owner" />
4534                 </retrieve>
4535                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4536                     <context link="resource" field="owner" />
4537                 </update>
4538                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4539                     <context link="resource" field="owner" />
4540                 </delete>
4541                         </actions>
4542                 </permacrud>
4543         </class>
4544         
4545         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4546                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4547                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4548                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4549                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4550                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4551                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4552                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4553                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4554                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4555                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4556                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4557                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4558                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4559                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4560                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4561                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4562                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4563                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4564                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4565                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4566                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4567                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4568                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4569                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4570                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4571                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4572                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4573                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4574                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4575                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4576                 </fields>
4577                 <links>
4578                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4579                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4580                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4581                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4582                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4583                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4584                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4585                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4586                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4587                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4588                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4589                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4590                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4591                 </links>
4592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4593                         <actions>
4594                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4595                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4596                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4597                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4598                         </actions>
4599                 </permacrud>
4600         </class>
4601         
4602         <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">
4603                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4604                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4605                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4606                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4607                 </fields>
4608                 <links>
4609                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4610                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4611                 </links>
4612                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4613                         <actions>
4614                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4615                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4616                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4617                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4618                         </actions>
4619                 </permacrud>
4620         </class>
4621
4622         <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">
4623                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4624                         <field name="bucket" reporter:datatype="link"/>
4625                         <field name="id" reporter:datatype="id" />
4626                         <field name="target_call_number" reporter:datatype="link" />
4627                         <field name="create_time" reporter:datatype="timestamp" />
4628                         <field name="pos" reporter:datatype="int" />
4629                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4630                 </fields>
4631                 <links>
4632                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4633                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4634             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4635                 </links>
4636         </class>
4637         <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">
4638                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4639                         <field name="id" reporter:datatype="id" />
4640                         <field name="item" reporter:datatype="link"/>
4641                         <field name="note" reporter:datatype="text" />
4642                 </fields>
4643                 <links>
4644                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4645                 </links>
4646         </class>
4647         <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">
4648                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4649                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4650                         <field name="btype" reporter:datatype="text"/>
4651                         <field name="id" reporter:datatype="id" />
4652                         <field name="name" reporter:datatype="text"/>
4653                         <field name="description" reporter:datatype="text"/>
4654                         <field name="owner" reporter:datatype="link"/>
4655                         <field name="pub" reporter:datatype="bool"/>
4656                         <field name="create_time" reporter:datatype="timestamp" />
4657                 </fields>
4658                 <links>
4659                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4660                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4661                 </links>
4662         </class>
4663         <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">
4664                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4665                         <field name="id" reporter:datatype="id" />
4666                         <field name="bucket" reporter:datatype="link"/>
4667                         <field name="note" reporter:datatype="text" />
4668                 </fields>
4669                 <links>
4670                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4671                 </links>
4672         </class>
4673         <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">
4674                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4675                         <field name="hold" reporter:datatype="link"/>
4676                         <field name="id" reporter:datatype="id" />
4677                         <field name="target_copy" reporter:datatype="link"/>
4678                         <field name="proximity" reporter:datatype="number"/>
4679                 </fields>
4680                 <links>
4681                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4682                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4683                 </links>
4684         </class>
4685         <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">
4686                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4687                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4688                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4689                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4690                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4691                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4692                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4693                 </fields>
4694                 <links>
4695                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4696                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4697                 </links>
4698         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4699             <actions>
4700                 <create permission="CREATE_HOLD_NOTIFICATION">
4701                                         <context link="hold" jump="usr" field="home_ou" />
4702                                 </create>
4703                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4704                                         <context link="hold" jump="usr" field="home_ou" />
4705                                 </retrieve>
4706                 <update permission="CREATE_HOLD_NOTIFICATION">
4707                                         <context link="hold" jump="usr" field="home_ou" />
4708                                 </update>
4709                 <delete permission="CREATE_HOLD_NOTIFICATION">
4710                                         <context link="hold" jump="usr" field="home_ou" />
4711                                 </delete>
4712             </actions>
4713         </permacrud>
4714         </class>
4715         <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">
4716                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4717                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4718                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4719                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4720                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4721                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4722                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4723                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4724                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4725                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4726                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4727                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4728                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4729                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4730                 </fields>
4731                 <links>
4732                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4733                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4734                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4735                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4736                 </links>
4737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4738             <actions>
4739                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4740                 <retrieve/>
4741                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4742                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4743             </actions>
4744         </permacrud>
4745         </class>
4746         <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">
4747                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4748                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4749                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4750                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4751                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4752             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4753             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4754             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4755                 </fields>
4756                 <links>
4757                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4758                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4759                 </links>
4760         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4761             <actions>
4762                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4763                 <retrieve/>
4764                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4765                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4766             </actions>
4767         </permacrud>
4768         </class>
4769         <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">
4770                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4771                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4772             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4773             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4774                 </fields>
4775                 <links>
4776                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4777                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4778                 </links>
4779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4780             <actions>
4781                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4782                                         <context link="lgroup" field="owner" />
4783                 </create>
4784                 <retrieve/>
4785                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4786                                         <context link="lgroup" field="owner" />
4787                 </update>
4788                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4789                                         <context link="lgroup" field="owner" />
4790                 </delete>
4791             </actions>
4792         </permacrud>
4793         </class>
4794
4795     <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">
4796         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4797             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4798             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4799             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4800             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4801         </fields>
4802         <links>
4803             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4804             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4805         </links>
4806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4807             <actions>
4808                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4809                 <retrieve/>
4810                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4811                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4812             </actions>
4813         </permacrud>
4814     </class>
4815
4816         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4817                 <fields>
4818                         <field name="sre_id" oils_persist:virtual="true" />
4819                         <field name="location" oils_persist:virtual="true" />
4820                         <field name="owning_lib" oils_persist:virtual="true" />
4821                         <field name="basic_holdings" oils_persist:virtual="true" />
4822                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4823                         <field name="supplement_holdings" oils_persist:virtual="true" />
4824                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4825                         <field name="index_holdings" oils_persist:virtual="true" />
4826                         <field name="index_holdings_add" oils_persist:virtual="true" />
4827                         <field name="online" oils_persist:virtual="true" />
4828                         <field name="missing" oils_persist:virtual="true" />
4829                         <field name="incomplete" oils_persist:virtual="true" />
4830                 </fields>
4831         </class>
4832
4833         <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">
4834                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4835                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4836                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4837                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4838                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4839                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4840                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4841                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4842                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4843                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4844                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4845                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4846                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4847                 </fields>
4848                 <links>
4849                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4850                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4851                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4852                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4853                 </links>
4854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4855                         <actions>
4856                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4857                                 <retrieve/>
4858                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4859                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4860                         </actions>
4861                 </permacrud>
4862         </class>
4863
4864         <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">
4865                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4866                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4867                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4868                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4869                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4870                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4871                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4872                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4873                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4874                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4875                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4876                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4877                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4878                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4879                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4880                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4881                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4882                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4883                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4884                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4885                 </fields>
4886                 <links>
4887                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4888                 </links>
4889                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4890                         <actions>
4891                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4892                                         <context link="subscription" field="owning_lib" />
4893                                 </create>
4894                                 <retrieve />
4895                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4896                                         <context link="subscription" field="owning_lib" />
4897                                 </update>
4898                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4899                                         <context link="subscription" field="owning_lib" />
4900                                 </delete>
4901                         </actions>
4902                 </permacrud>
4903         </class>
4904
4905         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4906                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4907                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4908                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4909                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4910                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4911                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4912                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4913                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4914                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4915                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4916                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4917                 </fields>
4918                 <links>
4919                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4920                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4921                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4922                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4923                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4924                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4925                 </links>
4926                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4927                         <actions>
4928                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4929                                 <retrieve />
4930                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4931                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4932                         </actions>
4933                 </permacrud>
4934         </class>
4935
4936         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4937                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4938                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4939                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4940                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4941                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4942                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4943                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4944                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4945                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4946                 </fields>
4947                 <links>
4948                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4949                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4950                 </links>
4951         </class>
4952
4953         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4954                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4955                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4956                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4957                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4958                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4959                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4960                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4961                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4962                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4963                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4964                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4965                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4966                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4967                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4968                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4969                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4970                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4971                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4972                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4973                 </fields>
4974                 <links>
4975                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4976                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4977                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4978                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4979                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4980                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4981                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4982                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4983                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4984                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4985                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4986                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4987                 </links>
4988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4989                         <actions>
4990                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4991                                 <retrieve />
4992                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4993                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4994                         </actions>
4995                 </permacrud>
4996         </class>
4997
4998         <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">
4999                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5000                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5001                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5002                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5003                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5004                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5005                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5006                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5007                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5008                 </fields>
5009                 <links>
5010                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5011                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5012                 </links>
5013                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5014                         <actions>
5015                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5016                                         <context link="distribution" field="holding_lib" />
5017                                 </create>
5018                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5019                                         <context link="distribution" field="holding_lib" />
5020                                 </retrieve>
5021                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5022                                         <context link="distribution" field="holding_lib" />
5023                                 </update>
5024                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5025                                         <context link="distribution" field="holding_lib" />
5026                                 </delete>
5027                         </actions>
5028                 </permacrud>
5029         </class>
5030
5031         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5032                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5033                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5034                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5035                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5036                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5037                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5038                 </fields>
5039                 <links>
5040                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5041                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
5042                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5043                 </links>
5044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5045                         <actions>
5046                                 <create permission="ADMIN_SERIAL_STREAM">
5047                                         <context link="distribution" field="holding_lib" />
5048                                 </create>
5049                                 <retrieve />
5050                                 <update permission="ADMIN_SERIAL_STREAM">
5051                                         <context link="distribution" field="holding_lib" />
5052                                 </update>
5053                                 <delete permission="ADMIN_SERIAL_STREAM">
5054                                         <context link="distribution" field="holding_lib" />
5055                                 </delete>
5056                         </actions>
5057                 </permacrud>
5058         </class>
5059
5060         <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">
5061                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5062                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5063                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5064                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5065                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5066                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5067                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5068                 </fields>
5069                 <links>
5070                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5071                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5072                 </links>
5073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5074                         <actions>
5075                                 <create permission="ADMIN_SERIAL_STREAM">
5076                                         <context link="stream" jump="distribution" field="holding_lib" />
5077                                 </create>
5078                                 <retrieve permission="RECEIVE_SERIAL">
5079                                         <context link="stream" jump="distribution" field="holding_lib" />
5080                                 </retrieve>
5081                                 <update permission="ADMIN_SERIAL_STREAM">
5082                                         <context link="stream" jump="distribution" field="holding_lib" />
5083                                 </update>
5084                                 <delete permission="ADMIN_SERIAL_STREAM">
5085                                         <context link="stream" jump="distribution" field="holding_lib" />
5086                                 </delete>
5087                         </actions>
5088                 </permacrud>
5089         </class>
5090
5091         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5092                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5093                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5094                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5095                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5096                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5097                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5098                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5099                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5100                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5101                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5102                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5103                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5104                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5105                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5106                 </fields>
5107                 <links>
5108                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5109                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5110                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5111                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5112                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5113                 </links>
5114                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5115                         <actions>
5116                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5117                                         <context link="subscription" field="owning_lib" />
5118                                 </create>
5119                                 <retrieve/>
5120                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5121                                         <context link="subscription" field="owning_lib" />
5122                                 </update>
5123                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5124                                         <context link="subscription" field="owning_lib" />
5125                                 </delete>
5126                         </actions>
5127                 </permacrud>
5128         </class>
5129
5130         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5131                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5132                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5133                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5134                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5135                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5136                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5137                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5138                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5139                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5140                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5141                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5142                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5143                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5144                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5145                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5146                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5147                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5148                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5149                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5150                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5151                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5152                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5153                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5154                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5155                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5156                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5157                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5158                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5159                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5160                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5161                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5162                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5163                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5164                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5165                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5166                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5167                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5168                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5169                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5170                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5171                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5172                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5173                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5174                 </fields>
5175                 <links>
5176                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5177                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5178                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5179                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5180                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5181                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5182                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5183                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5184                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5185                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5186                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5187                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5188                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5189                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5190                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5191                 </links>
5192                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5193                         <actions>
5194                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5195                                 <retrieve/>
5196                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5197                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5198                         </actions>
5199                 </permacrud>
5200         </class>
5201
5202         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5203                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5204                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5205                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5206                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5207                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5208                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5209                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5210                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5211                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5212                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5213                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5214                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5215                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5216                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5217                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
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="issuance" reltype="has_a" key="id" map="" class="siss"/>
5223                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5224                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5225                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5226                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5227                 </links>
5228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5229                         <actions>
5230                                 <create permission="ADMIN_SERIAL_ITEM">
5231                                         <context link="stream" jump="distribution" field="holding_lib" />
5232                                 </create>
5233                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5234                                         <context link="stream" jump="distribution" field="holding_lib" />
5235                                 </retrieve>
5236                                 <update permission="ADMIN_SERIAL_ITEM">
5237                                         <context link="stream" jump="distribution" field="holding_lib" />
5238                                 </update>
5239                                 <delete permission="ADMIN_SERIAL_ITEM">
5240                                         <context link="stream" jump="distribution" field="holding_lib" />
5241                                 </delete>
5242                         </actions>
5243                 </permacrud>
5244         </class>
5245
5246         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5247                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5248                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5249                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5250                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5251                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5252                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5253                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5254                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5255                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5256                 </fields>
5257                 <links>
5258                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5260                 </links>
5261                 <!-- Not available via PCRUD at this time -->
5262         </class>
5263         <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">
5264                 <fields>
5265                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5266                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5267                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5268                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5269                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5270                 </fields>
5271                 <links>
5272                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5273                 </links>
5274         </class>
5275         <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">
5276                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5277                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5278                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5279                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5280                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5281                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5282                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5283                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5284                 </fields>
5285                 <links>
5286                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5287                 </links>
5288         </class>
5289         <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">
5290                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5291                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5292                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5293                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5294                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5295                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5296                 </fields>
5297                 <links>
5298                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5299                 </links>
5300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5301                         <actions>
5302                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5303                                         <context link="distribution" field="holding_lib" />
5304                                 </create>
5305                                 <retrieve/>
5306                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5307                                         <context link="distribution" field="holding_lib" />
5308                                 </update>
5309                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5310                                         <context link="distribution" field="holding_lib" />
5311                                 </delete>
5312                         </actions>
5313                 </permacrud>
5314         </class>
5315
5316         <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">
5317                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5318                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5319                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5320                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5321                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5322                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5323                 </fields>
5324                 <links>
5325                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5326                 </links>
5327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5328                         <actions>
5329                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5330                                         <context link="distribution" field="holding_lib" />
5331                                 </create>
5332                                 <retrieve/>
5333                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5334                                         <context link="distribution" field="holding_lib" />
5335                                 </update>
5336                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5337                                         <context link="distribution" field="holding_lib" />
5338                                 </delete>
5339                         </actions>
5340                 </permacrud>
5341         </class>
5342
5343         <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">
5344                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5345                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5346                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5347                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5348                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5349                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5350                 </fields>
5351                 <links>
5352                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5353                 </links>
5354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5355                         <actions>
5356                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5357                                         <context link="distribution" field="holding_lib" />
5358                                 </create>
5359                                 <retrieve/>
5360                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5361                                         <context link="distribution" field="holding_lib" />
5362                                 </update>
5363                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5364                                         <context link="distribution" field="holding_lib" />
5365                                 </delete>
5366                         </actions>
5367                 </permacrud>
5368         </class>
5369
5370         <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">
5371                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5372                         <field name="id" reporter:datatype="id" />
5373                         <field name="owning_copy" reporter:datatype="link"/>
5374                         <field name="stat_cat" reporter:datatype="link"/>
5375                         <field name="stat_cat_entry" reporter:datatype="link"/>
5376                 </fields>
5377                 <links>
5378                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5379                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5380                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5381                 </links>
5382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5383                         <actions>
5384                                 <retrieve/>
5385                         </actions>
5386                 </permacrud>
5387         </class>
5388         <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">
5389                 <fields oils_persist:primary="code">
5390                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5391                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5392                 </fields>
5393                 <links/>
5394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5395             <actions>
5396                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5397                 <retrieve/>
5398                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5399                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5400             </actions>
5401         </permacrud>
5402         </class>
5403         <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">
5404                 <fields oils_persist:primary="code">
5405                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5406                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5407                 </fields>
5408                 <links/>
5409         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5410             <actions>
5411                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5412                 <retrieve/>
5413                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5414                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5415             </actions>
5416         </permacrud>
5417         </class>
5418         <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">
5419                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5420                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5421                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5422                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5423                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5424                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5425                 </fields>
5426                 <links>
5427             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5428         </links>
5429         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5430             <actions>
5431                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5432                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5433                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5434                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5435             </actions>
5436         </permacrud>
5437         </class>
5438         <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">
5439                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5440                         <field name="id" reporter:datatype="id" />
5441                         <field name="name" reporter:datatype="text"/>
5442                 </fields>
5443                 <links/>
5444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5445             <actions>
5446                 <create permission="CREATE_LASSO" global_required="true"/>
5447                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5448                 <update permission="UPDATE_LASSO" global_required="true"/>
5449                 <delete permission="DELETE_LASSO" global_required="true"/>
5450             </actions>
5451         </permacrud>
5452         </class>
5453         <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">
5454                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5455                         <field name="id" reporter:datatype="id" />
5456                         <field name="lasso" reporter:datatype="link"/>
5457                         <field name="org_unit" reporter:datatype="org_unit"/>
5458                 </fields>
5459                 <links>
5460                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5461                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5462                 </links>
5463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5464             <actions>
5465                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5466                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5467                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5468                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5469             </actions>
5470         </permacrud>
5471         </class>
5472         <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">
5473                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5474                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5475                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5476                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5477                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5478                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5479                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5480                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5481                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5482                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5483                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5484                 </fields>
5485                 <links>
5486                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5487                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5488                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5489                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5490                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5491                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5492                 </links>
5493         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5494             <actions>
5495                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5496                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5497                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5498                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5499             </actions>
5500         </permacrud>
5501         </class>
5502         <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">
5503                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5504                         <field name="id" reporter:datatype="id" />
5505                         <field name="from_org" reporter:datatype="org_unit"/>
5506                         <field name="to_org" reporter:datatype="org_unit"/>
5507                         <field name="prox" reporter:datatype="int" />
5508                 </fields>
5509                 <links>
5510                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5511                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5512                 </links>
5513         </class>
5514         <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">
5515                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5516                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5517                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5518                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5519                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5520                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5521                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5522                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5523                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5524                 </fields>
5525                 <links/>
5526         </class>
5527         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5528                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5529                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5530                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5531                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5532                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5533                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5534                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5535                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5536                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5537                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5538                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5539                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5540                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5541                 </fields>
5542                 <links>
5543                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5544                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5545                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5546                 </links>
5547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5548             <actions>
5549                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5550                 <retrieve/>
5551                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5552                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5553             </actions>
5554         </permacrud>
5555         </class>
5556         <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">
5557                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5558                         <field name="address_type"  reporter:datatype="text"/>
5559                         <field name="city"  reporter:datatype="text"/>
5560                         <field name="country"  reporter:datatype="text"/>
5561                         <field name="county"  reporter:datatype="text"/>
5562                         <field name="id" reporter:datatype="id" />
5563                         <field name="org_unit" reporter:datatype="org_unit"/>
5564                         <field name="post_code"  reporter:datatype="text"/>
5565                         <field name="state"  reporter:datatype="text"/>
5566                         <field name="street1"  reporter:datatype="text"/>
5567                         <field name="street2"  reporter:datatype="text"/>
5568                         <field name="valid" reporter:datatype="bool"/>
5569                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5570                 </fields>
5571                 <links>
5572                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5573                 </links>
5574         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5575             <actions>
5576                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5577                 <retrieve/>
5578                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5579                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5580             </actions>
5581         </permacrud>
5582         </class>
5583         <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">
5584                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5585                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5586                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5587                         <field name="query_text" reporter:datatype="text"/>
5588                 </fields>
5589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5590             <actions>
5591                 <retrieve/>
5592             </actions>
5593         </permacrud>
5594         </class>
5595
5596         <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">
5597                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5598                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5599                         <field name="owner" reporter:datatype="org_unit"/>
5600                         <field name="code" reporter:datatype="text"/>
5601                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5602                         <field name="create_date" reporter:datatype="timestamp"/>
5603                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5604                 </fields>
5605                 <links>
5606                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5607                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5608                 </links>
5609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5610             <actions>
5611                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5612                 <retrieve/>
5613                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5614                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5615             </actions>
5616         </permacrud>
5617         </class>
5618         <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">
5619                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5620                         <field name="id" reporter:datatype="id"/>
5621                         <field name="grp" reporter:datatype="link"/>
5622                         <field name="pos" reporter:datatype="int"/>
5623                         <field name="query" reporter:datatype="link"/>
5624                 </fields>
5625                 <links>
5626                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5627                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5628                 </links>
5629         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5630             <actions>
5631                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5632                     <context link="grp" field="owner"/>
5633                 </create>
5634                 <retrieve/>
5635                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5636                     <context link="grp" field="owner"/>
5637                 </update>
5638                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5639                     <context link="grp" field="owner"/>
5640                 </delete>
5641             </actions>
5642         </permacrud>
5643         </class>
5644
5645         <!-- A note: Please update alhr and ahopl when updating ahr -->
5646         <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">
5647                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5648                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5649                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5650                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5651                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5652                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5653                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5654                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5655                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5656                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5657                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5658                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5659                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5660                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5661                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5662                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5663                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5664                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5665                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5666                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5667                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5668                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5669                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5670                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5671                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5672                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5673                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5674                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5675                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5676                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5677                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5678                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5679                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5680                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5681                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5682                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5683                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5684                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5685                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5686                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5687                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5688                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5689                 </fields>
5690                 <links>
5691                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5692                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5693                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5694                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5695                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5696                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5697                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5698                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5699                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5700                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5701                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5702                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5703                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5704                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5705                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5706                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5707                 </links>
5708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5709                         <actions>
5710                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5711                         </actions>
5712                 </permacrud>
5713         </class>
5714         <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">
5715                 <oils_persist:source_definition><![CDATA[
5716                 SELECT
5717                         ahr.*,
5718                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5719                                 copy_location_order_position,
5720                         CASE WHEN au.alias IS NOT NULL THEN
5721                                 au.alias
5722                         ELSE
5723                                 au.first_given_name
5724                         END AS usr_alias_or_first_given_name,
5725                         au.first_given_name AS usr_first_given_name,
5726                         au.second_given_name AS usr_second_given_name,
5727                         au.family_name AS usr_family_name,
5728                         au.prefix AS usr_prefix,
5729                         au.suffix AS usr_suffix,
5730                         au.alias AS usr_alias,
5731                         CASE WHEN au.alias IS NOT NULL THEN
5732                                 au.alias
5733                         ELSE
5734                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5735                                         COALESCE(au.family_name, ''),
5736                                         COALESCE(au.suffix, ''),
5737                                         ', ',
5738                                         COALESCE(au.prefix, ''),
5739                                         COALESCE(au.first_given_name, ''),
5740                                         COALESCE(au.second_given_name, '')
5741                                 ], ' '), E'\\s+,', ',')
5742                         END AS usr_alias_or_display_name,
5743                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5744                                 COALESCE(au.family_name, ''),
5745                                 COALESCE(au.suffix, ''),
5746                                 ', ',
5747                                 COALESCE(au.prefix, ''),
5748                                 COALESCE(au.first_given_name, ''),
5749                                 COALESCE(au.second_given_name, '')
5750                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5751                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5752                                 AS call_number_label,
5753                         siss.label AS issuance_label,
5754                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5755                         ahcm_1.copy_count AS potential_copies
5756                 FROM action.hold_request ahr
5757                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5758                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5759                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5760                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5761                 JOIN actor.usr au ON (au.id = ahr.usr)
5762                 JOIN (
5763                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5764                         FROM asset.copy_location
5765                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5766                 LEFT JOIN actor.usr_standing_penalty ausp 
5767                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5768                 LEFT JOIN config.standing_penalty csp
5769                         ON (
5770                                 csp.id = ausp.standing_penalty AND 
5771                                 csp.block_list LIKE '%CAPTURE%' AND (
5772                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5773                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5774                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5775                                         )
5776                                 )
5777                         )
5778                 JOIN (
5779                         SELECT COUNT(target_copy) AS copy_count, hold
5780                         FROM action.hold_copy_map
5781                         GROUP BY 2
5782                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5783                 LEFT JOIN serial.issuance siss
5784                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5785                 LEFT JOIN asset.copy_location_order acplo
5786                         ON (acp.location = acplo.location AND
5787                                 acp.circ_lib = acplo.org)
5788                 WHERE
5789                         ahr.capture_time IS NULL AND
5790                         ahr.cancel_time IS NULL AND
5791                         csp.id IS NULL AND
5792                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5793                         acp.status IN (0,7)
5794                 ]]></oils_persist:source_definition>
5795                 <fields oils_persist:primary="id">
5796                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5797                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5798                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5799                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5800                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5801                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5802                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5803                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5804                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5805                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5806                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5807                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5808                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5809                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5810                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5811                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5812                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5813                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5814                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5815                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5816                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5817                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5818                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5819                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5820                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5821                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5822                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5823                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5824                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5825                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5826                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5827                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5828                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5829                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5830                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5831                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5832                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5833                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5834                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5835                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5836                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5837                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5838                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5839                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5840                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5841                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5842                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5843                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5844                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5845                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5846                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5847                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5848                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5849                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5850                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5851                 </fields>
5852                 <links>
5853                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5854                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5855                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5856                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5857                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5858                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5859                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5860                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5861                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5862                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5863                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5864                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5865                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5866                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5867                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5868                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5869                 </links>
5870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5871                         <actions>
5872                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5873                         </actions>
5874                 </permacrud>
5875         </class>
5876         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5877                 <oils_persist:source_definition>
5878                         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)
5879                 </oils_persist:source_definition>
5880                 <fields oils_persist:primary="id">
5881                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5882                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5883                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5884                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5885                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5886                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5887                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5888                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5889                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5890                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5891                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5892                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5893                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5894                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5895                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5896                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5897                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5898                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5899                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5900                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5901                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5902                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5903                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5904                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5905                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5906                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5907                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5908                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5909                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5910                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5911                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5912                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5913                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5914                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5915                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5916                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5917                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5918                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5919                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5920                 </fields>
5921                 <links>
5922                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5923                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5924                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5925                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5926                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5927                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5928                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5929                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5930                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5931                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5932                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5933                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5934                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5935                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5936                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5937                 </links>
5938         </class>
5939
5940         <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">
5941                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5942                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5943                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5944                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5945                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5946                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5947                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5948                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5949                 </fields>
5950                 <links>
5951                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5952                 </links>
5953                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5954                         <actions>
5955                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5956                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5957                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5958                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5959                         </actions>
5960                 </permacrud>
5961         </class>
5962         <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">
5963                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5964                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5965                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5966                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5967                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5968                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5969                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5970                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5971                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5972                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5973                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5974                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5975                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5976                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5977                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5978                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5979                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5980                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5981                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5982                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5983                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5984                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5985                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5986                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5987                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5988                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5989                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5990                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5991                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5992                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5993                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5994                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5995                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5996                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5997                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5998                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5999                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6000                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6001                 </fields>
6002                 <links>
6003                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6004                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6005                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6006                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6007                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6008                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6009                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6010                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6011                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6012                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6013                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6014                 </links>
6015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6016                         <actions>
6017                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6018                         </actions>
6019                 </permacrud>
6020         </class>
6021         <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">
6022                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6023                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6024                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6025                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
6026                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6027                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6028                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6029                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6030                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6031                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6032                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6033                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6034                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6035                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6036                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6037                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6038                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6039                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6040                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6041                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6042                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6043                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6044                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6045                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6046                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6047                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6048                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6049                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6050                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6051                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6052                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6053                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6054                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6055                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6056                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6057                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6058                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6059                 </fields>
6060                 <links>
6061                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6062                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6063                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6064                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6065                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6066                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6067                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6068                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6069                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6070                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6071                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6072                 </links>
6073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6074                         <actions>
6075                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6076                         </actions>
6077                 </permacrud>
6078         </class>
6079
6080         <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">
6081                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6082                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6083                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6084                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6085                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6086                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6087                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6088                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6089                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6090                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6091                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6092                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6093                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6094                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6095                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6096                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6097                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6098                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6099                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6100                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6101                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6102                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6103                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6104                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6105                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6106                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6107                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6108                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6109                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6110                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6111                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6112                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6113                 </fields>
6114                 <links>
6115                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6116                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6117                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6118                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6119                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6120                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6121                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6122                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6123                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6124                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6125                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6126                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6127                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6128                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6129                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6130                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6131                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6132                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6133                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6134                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6135                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6136                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6137                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6138                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6139                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6140                 </links>
6141         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6142             <actions>
6143                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6144                 <retrieve />
6145                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6146                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6147             </actions>
6148         </permacrud>
6149         </class>
6150         <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">
6151                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6152                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6153                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6154                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6155                 </fields>
6156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6157                         <actions>
6158                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6159                                 <retrieve/>
6160                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6161                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6162                         </actions>
6163                 </permacrud>
6164         </class>
6165         <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">
6166                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6167                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6168                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6169                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6170                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6171                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6172                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6173                 </fields>
6174                 <links>
6175                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6176                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6177                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6178                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6179                 </links>
6180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6181                         <actions>
6182                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6183                                 <retrieve/>
6184                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6185                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6186                         </actions>
6187                 </permacrud>
6188         </class>
6189         <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">
6190                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6191                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6192                         <field name="btype" reporter:datatype="text"/>
6193                         <field name="id" reporter:datatype="id" />
6194                         <field name="name"  reporter:datatype="text"/>
6195                         <field name="description" reporter:datatype="text"/>
6196                         <field name="owner" reporter:datatype="link"/>
6197                         <field name="pub" reporter:datatype="bool"/>
6198                         <field name="create_time" reporter:datatype="timestamp" />
6199                 </fields>
6200                 <links>
6201                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6202                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6203                 </links>
6204         </class>
6205         <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">
6206                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6207                         <field name="id" reporter:datatype="id" />
6208                         <field name="bucket" reporter:datatype="link"/>
6209                         <field name="note" reporter:datatype="text" />
6210                 </fields>
6211                 <links>
6212                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6213                 </links>
6214         </class>
6215         <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">
6216                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6217                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6218                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6219                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6220                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6221                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6222                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6223                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6224                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6225                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6226                 </fields>
6227                 <links>
6228                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6229                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6230                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6231                 </links>
6232                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6233                         <actions>
6234                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6235                         </actions>
6236                 </permacrud>
6237         </class>
6238         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6239                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6240                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6241                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6242                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6243                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6244                 </fields>
6245                 <links>
6246                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6247                 </links>
6248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6249                         <actions>
6250                                 <retrieve permission="VIEW_USER">
6251                                         <context link="usr" field="home_ou" />
6252                                 </retrieve>
6253                         </actions>
6254                 </permacrud>
6255         </class>
6256     <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">
6257         <fields oils_persist:primary="field">
6258             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6259             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6260             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6261         </fields>
6262         <links/>
6263         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6264             <actions>
6265                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6266                 <retrieve />
6267                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6268                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6269             </actions>
6270         </permacrud>
6271     </class>
6272         <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">
6273                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6274                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6275                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6276                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6277                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6278                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6279                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6280                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6281                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6282                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6283                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6284                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6285                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6286                 </fields>
6287                 <links>
6288                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6289                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6290                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6291                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6292                 </links>
6293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6294             <actions>
6295                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6296                 <retrieve />
6297                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6298                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6299             </actions>
6300         </permacrud>
6301         </class>
6302         <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">
6303                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6304                         <field name="field" reporter:datatype="link"/>
6305                         <field name="id" reporter:datatype="id" />
6306                         <field name="source" reporter:datatype="link"/>
6307                         <field name="value"  reporter:datatype="text"/>
6308                 </fields>
6309                 <links>
6310                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6311                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6312                 </links>
6313         </class>
6314         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6315                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6316                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6317                         <field name="btype" reporter:datatype="text"/>
6318                         <field name="id" reporter:datatype="id" />
6319                         <field name="name"  reporter:datatype="text"/>
6320                         <field name="description" reporter:datatype="text"/>
6321                         <field name="owner" reporter:datatype="link"/>
6322                         <field name="pub" reporter:datatype="bool"/>
6323                         <field name="create_time" reporter:datatype="timestamp" />
6324                 </fields>
6325                 <links>
6326                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6327                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6328                 </links>
6329         </class>
6330         <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">
6331                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6332                         <field name="id" reporter:datatype="id" />
6333                         <field name="bucket" reporter:datatype="link"/>
6334                         <field name="note" reporter:datatype="text" />
6335                 </fields>
6336                 <links>
6337                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6338                 </links>
6339         </class>
6340         <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">
6341                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6342                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6343                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6344                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6345                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6346                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6347                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6348                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6349                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6350                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6351                 </fields>
6352                 <links>
6353                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6354                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6355                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6356                 </links>
6357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6358             <actions>
6359                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6360                     <context link="xact" jump="usr" field="home_ou"/>
6361                 </retrieve>
6362                         </actions>
6363                 </permacrud>
6364         </class>
6365         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6366                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6367                         <field name="id" reporter:datatype="id" />
6368                         <field name="ind1" />
6369                         <field name="ind2" />
6370                         <field name="record" />
6371                         <field name="subfield" />
6372                         <field name="tag" />
6373                         <field name="value" />
6374                 </fields>
6375                 <links>
6376                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6377                 </links>
6378         </class>
6379         <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">
6380                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6381                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6382                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6383                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6384                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6385                 </fields>
6386                 <links>
6387                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6388                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6389                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6390                 </links>
6391         </class>
6392         <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">
6393                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6394                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6395                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6396                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6397                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6398                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6399                 </fields>
6400                 <links>
6401                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6402                 </links>
6403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6404             <actions>
6405                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6406                 <retrieve/>
6407                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6408                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6409             </actions>
6410         </permacrud>
6411
6412         </class>
6413         <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">
6414                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6415                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6416                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6417                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6418                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6419                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6420                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6421                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6422                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6423                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6424                 </fields>
6425                 <links>
6426                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6427                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6428                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6429                 </links>
6430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6431             <actions>
6432                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6433                 <retrieve/>
6434                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6435                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6436             </actions>
6437         </permacrud>
6438         </class>
6439         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6440                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6441                         <field name="create_date" reporter:datatype="timestamp"/>
6442                         <field name="creator" reporter:datatype="link"/>
6443                         <field name="edit_date" reporter:datatype="timestamp"/>
6444                         <field name="editor" reporter:datatype="link"/>
6445                         <field name="id" reporter:datatype="id" />
6446                         <field name="pub" reporter:datatype="bool"/>
6447                         <field name="record" reporter:datatype="link"/>
6448                         <field name="value"  reporter:datatype="text"/>
6449                 </fields>
6450                 <links>
6451                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6452                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6453                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6454                 </links>
6455         </class>
6456         <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">
6457                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6458                         <field name="balance_owed" reporter:datatype="money" />
6459                         <field name="total_owed" reporter:datatype="money" />
6460                         <field name="total_paid" reporter:datatype="money" />
6461                         <field name="usr" reporter:datatype="link"/>
6462                 </fields>
6463                 <links>
6464                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6465                 </links>
6466         </class>
6467         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6468                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6469                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6470                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6471                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6472                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6473                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6474                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6475                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6476                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6477                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6478                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6479                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6480                 </fields>
6481                 <links>
6482                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6483                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6484                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6485                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6486                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6487                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6488                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6489                 </links>
6490         </class>
6491         <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">
6492                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6493                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6494                         <field name="quality" reporter:datatype="int" />
6495                         <field name="source" reporter:datatype="text"/>
6496                         <field name="transcendant" reporter:datatype="bool"/>
6497                         <field name="can_have_copies" reporter:datatype="bool"/>
6498                 </fields>
6499                 <links/>
6500         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6501             <actions>
6502                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6503                 <retrieve/>
6504                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6505                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6506             </actions>
6507         </permacrud>
6508         </class>
6509         <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">
6510                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6511                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6512                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6513                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6514                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6515                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6516                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6517                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6518                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6519                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6520                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6521                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6522                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6523                 </fields>
6524                 <links>
6525                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6526                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6527                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6528                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6529                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6530                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6531                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6532                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6533                 </links>
6534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6535                         <actions>
6536                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6537                                         <context link="usr" field="home_ou" />
6538                                 </retrieve>
6539                         </actions>
6540                 </permacrud>
6541         </class>
6542         <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">
6543                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6544                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6545                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6546                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6547                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6548                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6549                 </fields>
6550                 <links>
6551                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6552                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6553                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6554                 </links>
6555         </class>
6556         <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">
6557                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6558                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6559                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6560                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6561                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6562                 </fields>
6563                 <links>
6564                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6565                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6566                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6567                 </links>
6568         </class>
6569         <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">
6570                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6571                         <field name="bucket" reporter:datatype="link"/>
6572                         <field name="id" reporter:datatype="id" />
6573                         <field name="target_user" reporter:datatype="link"/>
6574                         <field name="create_time" reporter:datatype="timestamp" />
6575                         <field name="pos" reporter:datatype="int" />
6576                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6577                 </fields>
6578                 <links>
6579                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6580                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6581             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6582                 </links>
6583         </class>
6584         <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">
6585                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6586                         <field name="id" reporter:datatype="id" />
6587                         <field name="item" reporter:datatype="link"/>
6588                         <field name="note" reporter:datatype="text" />
6589                 </fields>
6590                 <links>
6591                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6592                 </links>
6593         </class>
6594         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6595                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6596                         <field name="balance_owed" reporter:datatype="money" />
6597                         <field name="total_owed" reporter:datatype="money" />
6598                         <field name="total_paid" reporter:datatype="money" />
6599                         <field name="usr" reporter:datatype="link"/>
6600                 </fields>
6601                 <links>
6602                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6603                 </links>
6604         </class>
6605         <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">
6606                 <fields oils_persist:primary="code" oils_persist:sequence="">
6607                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6608                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6609                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6610                 </fields>
6611                 <links/>
6612         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6613             <actions>
6614                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6615                 <retrieve/>
6616                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6617                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6618             </actions>
6619         </permacrud>
6620         </class>
6621         <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">
6622                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6623                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6624                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6625                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6626                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6627                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6628                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6629                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6630                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6631                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6632                 </fields>
6633                 <links>
6634                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6635                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6636                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6637                 </links>
6638         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6639             <actions>
6640                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6641                     <context link="xact" jump="usr" field="home_ou"/>
6642                 </retrieve>
6643                         </actions>
6644                 </permacrud>
6645         </class>
6646         <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">
6647                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6648                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6649                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6650                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6651                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6652                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6653                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6654                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6655                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6656                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6657                 </fields>
6658                 <links>
6659                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6660                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6661                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6662                 </links>
6663         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6664             <actions>
6665                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6666                     <context link="xact" jump="usr" field="home_ou"/>
6667                 </retrieve>
6668                         </actions>
6669                 </permacrud>
6670         </class>
6671         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6672                 <fields oils_persist:primary="id" oils_persist:sequence="">
6673                         <field name="checkin_lib" reporter:datatype="link"/>
6674                         <field name="checkin_staff" reporter:datatype="link"/>
6675                         <field name="checkin_time" reporter:datatype="timestamp"/>
6676                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6677                         <field name="circ_staff" reporter:datatype="link"/>
6678                         <field name="desk_renewal" reporter:datatype="bool"/>
6679                         <field name="due_date" reporter:datatype="timestamp"/>
6680                         <field name="duration" reporter:datatype="interval"/>
6681                         <field name="duration_rule" reporter:datatype="link"/>
6682                         <field name="fine_interval" reporter:datatype="interval"/>
6683                         <field name="id" reporter:datatype="id" />
6684                         <field name="max_fine" reporter:datatype="money" />
6685                         <field name="max_fine_rule" reporter:datatype="link"/>
6686                         <field name="opac_renewal" reporter:datatype="bool"/>
6687                         <field name="phone_renewal" reporter:datatype="bool"/>
6688                         <field name="recurring_fine" reporter:datatype="money" />
6689                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6690                         <field name="renewal_remaining" reporter:datatype="int" />
6691             <field name="grace_period" reporter:datatype="interval" />
6692                         <field name="stop_fines" reporter:datatype="text"/>
6693                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6694                         <field name="target_copy" reporter:datatype="link"/>
6695                         <field name="usr" reporter:datatype="link"/>
6696                         <field name="xact_finish" reporter:datatype="timestamp" />
6697                         <field name="xact_start" reporter:datatype="timestamp" />
6698                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6699                 </fields>
6700                 <links>
6701                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6702                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6703                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6704                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6705                 </links>
6706         </class>
6707         <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">
6708                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6709                         <field name="field" reporter:datatype="link"/>
6710                         <field name="id" reporter:datatype="id" />
6711                         <field name="source" reporter:datatype="link"/>
6712                         <field name="value" reporter:datatype="text"/>
6713                 </fields>
6714                 <links>
6715                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6716                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6717                 </links>
6718         </class>
6719         <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">
6720                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6721                         <field name="high" reporter:datatype="money" />
6722                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6723                         <field name="low" reporter:datatype="money" />
6724                         <field name="name" reporter:datatype="text"/>
6725                         <field name="normal" reporter:datatype="money" />
6726                         <field name="recurrence_interval" reporter:datatype="interval"/>
6727             <field name="grace_period" reporter:datatype="interval" />
6728                 </fields>
6729                 <links/>
6730         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6731             <actions>
6732                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6733                 <retrieve/>
6734                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6735                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6736             </actions>
6737         </permacrud>
6738         </class>
6739         <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">
6740                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6741                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6742                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6743                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6744                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6745                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6746                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6747                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6748                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6749                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6750                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6751                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6752                 </fields>
6753                 <links>
6754                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6755                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6756                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6757                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6758                 </links>
6759         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6760             <actions>
6761                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6762                     <context link="xact" jump="usr" field="home_ou"/>
6763                 </retrieve>
6764                         </actions>
6765                 </permacrud>
6766         </class>
6767         <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">
6768                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6769                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6770                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6771                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6772                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6773                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6774                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6775                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6776                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6777                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6778                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6779                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6780                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6781                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6782                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6783                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6784                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6785                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6786                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6787                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6788                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6789                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6790                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6791                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6792                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6793                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6794                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6795                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6796                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6797                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6798                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6799                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6800                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6801                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6802                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6803                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6804                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6805                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6806                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6807                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6808                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6809                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6810                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6811                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6812                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6813                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6814                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6815                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6816                 </fields>
6817                 <links>
6818                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6819                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6820                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6821                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6822                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6823                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6824                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6825                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6826                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6827                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6828                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6829                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6830                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6831                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6832                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6833                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6834                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6835                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6836                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6837                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6838                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6839                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6840                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
6841                 </links>
6842         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6843             <actions>
6844                 <create permission="CREATE_COPY">
6845                     <context link="call_number" field="owning_lib"/>
6846                 </create>
6847                 <retrieve/>
6848                 <update permission="UPDATE_COPY">
6849                     <context link="call_number" field="owning_lib"/>
6850                 </update>
6851                 <delete permission="DELETE_COPY">
6852                     <context link="call_number" field="owning_lib"/>
6853                 </delete>
6854             </actions>
6855         </permacrud>
6856         </class>
6857
6858         <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">
6859                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6860                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6861                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6862                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6863                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6864                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6865                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6866                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6867                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6868                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6869                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6870                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6871                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6872                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6873                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6874                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6875                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6876                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6877                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6878                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6879                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6880                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6881                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6882                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6883                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6884                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6885                 </fields>
6886                 <links>
6887                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6888                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6889                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6890                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6891                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6892                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6893                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6894                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6895                 </links>
6896                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6897                         <actions>
6898                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6899                                 <retrieve />
6900                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6901                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6902                         </actions>
6903                 </permacrud>
6904         </class>
6905
6906         <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">
6907                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6908                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6909                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6910                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6911                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6912                 </fields>
6913                 <links/>
6914         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6915             <actions>
6916                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6917                 <retrieve/>
6918                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6919                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6920             </actions>
6921         </permacrud>
6922         </class>
6923         <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">
6924                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6925                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6926                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6927                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6928                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6929                 </fields>
6930                 <links/>
6931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6932             <actions>
6933                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6934                 <retrieve/>
6935                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6936                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6937             </actions>
6938         </permacrud>
6939         </class>
6940         <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">
6941                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6942                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6943                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6944                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6945                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6946                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6947                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6948                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6949                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6950                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6951                 </fields>
6952                 <links>
6953                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6954                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6955                 </links>
6956         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6957             <actions>
6958                 <create permission="CREATE_PERM" global_required="true"/>
6959                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6960                 <update permission="UPDATE_PERM" global_required="true"/>
6961                 <delete permission="DELETE_PERM" global_required="true"/>
6962             </actions>
6963         </permacrud>
6964         </class>
6965         <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">
6966                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6967                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6968                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6969                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6970                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6971                 </fields>
6972                 <links>
6973                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6974                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6975                 </links>
6976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6977             <actions>
6978                 <create permission="ADMIN_SURVEY">
6979                     <context link="question" jump="survey" field="owner"/>
6980                 </create>
6981                 <retrieve/>
6982                 <update permission="ADMIN_SURVEY">
6983                     <context link="question" jump="survey" field="owner"/>
6984                 </update>
6985                 <delete permission="ADMIN_SURVEY">
6986                     <context link="question" jump="survey" field="owner"/>
6987                 </delete>
6988             </actions>
6989         </permacrud>
6990         </class>
6991         <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">
6992                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6993                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6994                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6995                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6996                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6997                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6998                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6999                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7000                 </fields>
7001                 <links>
7002                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7003                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7004                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7005                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7006                 </links>
7007                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7008                         <actions>
7009                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7010                         </actions>
7011                 </permacrud>
7012         </class>
7013         <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">
7014                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7015                         <field name="balance_owed" reporter:datatype="money" />
7016                         <field name="total_owed" reporter:datatype="money" />
7017                         <field name="total_paid" reporter:datatype="money" />
7018                         <field name="usr" reporter:datatype="link"/>
7019                 </fields>
7020                 <links>
7021                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7022                 </links>
7023         </class>
7024         <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">
7025                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7026                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7027                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7028                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7029                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7030                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7031                 </fields>
7032                 <links>
7033                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7034                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7035                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7036                 </links>
7037         </class>
7038         <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">
7039                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7040                         <field name="field" reporter:datatype="link"/>
7041                         <field name="id" reporter:datatype="id" />
7042                         <field name="source" reporter:datatype="link"/>
7043                         <field name="value" reporter:datatype="text"/>
7044                 </fields>
7045                 <links>
7046                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7047                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7048                 </links>
7049         </class>
7050         <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">
7051                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7052                         <field name="field" reporter:datatype="link"/>
7053                         <field name="id" reporter:datatype="id" />
7054                         <field name="source" reporter:datatype="link"/>
7055                         <field name="value" reporter:datatype="text"/>
7056                 </fields>
7057                 <links>
7058                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7059                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7060                 </links>
7061         </class>
7062         <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">
7063                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7064                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7065                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7066                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7067                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7068                 </fields>
7069                 <links>
7070                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7071                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7072                 </links>
7073         </class>
7074         <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">
7075                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7076                         <field name="depth" reporter:datatype="int" />
7077                         <field name="grantable" reporter:datatype="bool"/>
7078                         <field name="grp" reporter:datatype="link"/>
7079                         <field name="id" reporter:datatype="id" />
7080                         <field name="perm" reporter:datatype="link"/>
7081                 </fields>
7082                 <links>
7083                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7084                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7085                 </links>
7086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7087             <actions>
7088                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7089                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7090                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7091                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7092             </actions>
7093         </permacrud>
7094         </class>
7095         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7096                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7097                         <field name="items" oils_persist:virtual="true" />
7098                         <field name="btype" reporter:datatype="text"/>
7099                         <field name="id" reporter:datatype="id" />
7100                         <field name="name" reporter:datatype="text"/>
7101                         <field name="description" reporter:datatype="text"/>
7102                         <field name="owner" reporter:datatype="link"/>
7103                         <field name="pub" reporter:datatype="bool"/>
7104                         <field name="create_time" reporter:datatype="timestamp" />
7105                 </fields>
7106                 <links>
7107                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7108                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7109                 </links>
7110         </class>
7111         <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">
7112                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7113                         <field name="id" reporter:datatype="id" />
7114                         <field name="bucket" reporter:datatype="link"/>
7115                         <field name="note" reporter:datatype="text" />
7116                 </fields>
7117                 <links>
7118                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7119                 </links>
7120         </class>
7121         <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">
7122                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7123                         <field name="id" reporter:datatype="int" />
7124                         <field name="usr" reporter:datatype="link"/>
7125                         <field name="work_ou" reporter:datatype="link"/>
7126                 </fields>
7127                 <links>
7128                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7129                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7130                 </links>
7131         </class>
7132         <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">
7133                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7134                         <field name="depth" reporter:datatype="int"/>
7135                         <field name="grantable" reporter:datatype="bool"/>
7136                         <field name="id" reporter:datatype="id" />
7137                         <field name="perm" reporter:datatype="link"/>
7138                         <field name="usr" reporter:datatype="link"/>
7139                 </fields>
7140                 <links>
7141                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7142                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7143                 </links>
7144         </class>
7145         <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">
7146                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7147                         <field name="object_id" reporter:datatype="text"/>
7148                         <field name="grantable" reporter:datatype="bool"/>
7149                         <field name="id" reporter:datatype="id" />
7150                         <field name="perm" reporter:datatype="link"/>
7151                         <field name="usr" reporter:datatype="link"/>
7152                         <field name="object_type" reporter:datatype="text"/>
7153                 </fields>
7154                 <links>
7155                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7156                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7157                 </links>
7158         </class>
7159         <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">
7160                 <fields oils_persist:primary="id" oils_persist:sequence="">
7161                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7162                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7163                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7164                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7165                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7166                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7167                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7168                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7169                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7170                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7171                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7172                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7173                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7174                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7175                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7176                 </fields>
7177                 <links>
7178                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7179                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7180                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7181                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7182                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7183                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7184                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7185                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7186                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7187                 </links>
7188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7189             <actions>
7190                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7191                     <context link="xact" jump="usr" field="home_ou"/>
7192                 </retrieve>
7193                         </actions>
7194                 </permacrud>
7195         </class>
7196         <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">
7197                 <fields oils_persist:primary="id" oils_persist:sequence="">
7198                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7199                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7200                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7201                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7202                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7203                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7204                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7205                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7206                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7207                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7208                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7209                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7210                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7211                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7212                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7213                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7214                 </fields>
7215                 <links>
7216                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7217                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7218                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7219                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7220                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7221                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7222                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7223                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7224                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7225                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7226                 </links>
7227         </class>
7228         <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">
7229                 <fields oils_persist:primary="id" oils_persist:sequence="">
7230                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7231                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7232                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7233                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7234                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7235                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7236                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7237                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7238                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7239                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7240                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7241                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7242                 </fields>
7243                 <links>
7244                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7245                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7246                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7247                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7248                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7249                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7250                 </links>
7251         </class>
7252         <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">
7253                 <fields oils_persist:primary="id" oils_persist:sequence="">
7254                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7255                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7256                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7257                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7258                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7259                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7260                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7261                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7262                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7263                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7264                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7265                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7266                 </fields>
7267                 <links>
7268                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7269                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7270                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7271                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7272                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7273                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7274                 </links>
7275         </class>
7276         <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">
7277                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7278                         <field name="bucket" reporter:datatype="link"/>
7279                         <field name="id" reporter:datatype="id" />
7280                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7281                         <field name="create_time" reporter:datatype="timestamp" />
7282                         <field name="pos" reporter:datatype="int" />
7283                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7284                 </fields>
7285                 <links>
7286                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7287                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7288             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7289                 </links>
7290         </class>
7291         <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">
7292                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7293                         <field name="id" reporter:datatype="id" />
7294                         <field name="item" reporter:datatype="link"/>
7295                         <field name="note" reporter:datatype="text" />
7296                 </fields>
7297                 <links>
7298                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7299                 </links>
7300         </class>
7301         <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">
7302                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7303                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7304                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7305                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7306                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7307                 </fields>
7308                 <links>
7309                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7310                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7311                 </links>
7312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7313                         <actions>
7314                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7315                         </actions>
7316                 </permacrud>
7317         </class>
7318     <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">
7319         <fields oils_persist:primary="field">
7320             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7321             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7322             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7323         </fields>
7324         <links/>
7325         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7326             <actions>
7327                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7328                 <retrieve />
7329                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7330                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7331             </actions>
7332         </permacrud>
7333     </class>
7334         <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">
7335                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7336                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7337                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7338                 </fields>
7339                 <links/>
7340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7341             <actions>
7342                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7343                 <retrieve/>
7344                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7345                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7346             </actions>
7347         </permacrud>
7348         </class>
7349
7350
7351         <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">
7352                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7353                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7354                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7355                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7356                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7357                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7358                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7359                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7360                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7361                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7362                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7363                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7364                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7365                 </fields>
7366                 <links>
7367                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7368                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7369                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7370                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7371                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7372                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7373                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7374                 </links>
7375         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7376             <actions>
7377                 <create permission="TRANSIT_COPY">
7378                     <context link="target_copy" field="owner"/>
7379                 </create>
7380                 <retrieve/>
7381                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7382                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7383             </actions>
7384         </permacrud>
7385         </class>
7386         <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">
7387                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7388                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7389                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7390                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7391                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7392                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7393                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7394                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7395                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7396                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7397                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7398                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7399                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7400                 </fields>
7401                 <links>
7402                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7403                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7404                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7405                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7406                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7407                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7408                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7409                 </links>
7410         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7411             <actions>
7412                 <create permission="TRANSIT_COPY" context_field="owner">
7413                     <context link="target_copy" field="circ_lib"/>
7414                 </create>
7415                 <retrieve/>
7416                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7417                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7418             </actions>
7419         </permacrud>
7420         </class>
7421         <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">
7422                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7423                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7424                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7425                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7426                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7427                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7428                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7429                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7430                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7431                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7432                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7433                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7434                 </fields>
7435                 <links>
7436                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7437                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7438                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7439                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7440                 </links>
7441         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7442             <actions>
7443                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7444                     <context link="xact" jump="usr" field="home_ou"/>
7445                 </retrieve>
7446                         </actions>
7447                 </permacrud>
7448         </class>
7449         <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">
7450                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7451                         <field name="grp" />
7452                         <field name="id" reporter:datatype="id" />
7453                         <field name="usr" />
7454                 </fields>
7455                 <links>
7456                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7457                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7458                 </links>
7459         </class>
7460         <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">
7461                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7462                         <field name="id" reporter:datatype="id" />
7463                         <field name="fq_field" reporter:datatype="text"/>
7464                         <field name="identity_value" reporter:datatype="text"/>
7465                         <field name="translation" reporter:datatype="text"/>
7466                         <field name="string" reporter:datatype="text"/>
7467                 </fields>
7468                 <links>
7469                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7470                 </links>
7471         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7472             <actions>
7473                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7474                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7475                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7476                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7477             </actions>
7478         </permacrud>
7479         </class>
7480         <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">
7481                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7482                         <field name="id" reporter:datatype="id" />
7483                         <field name="fm_class" reporter:datatype="text"/>
7484                         <field name="field" reporter:datatype="text"/>
7485                         <field name="owner" reporter:datatype="org_unit"/>
7486                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7487                 </fields>
7488                 <links>
7489                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7490                 </links>
7491         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7492             <actions>
7493                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7494                 <retrieve/>
7495                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7496                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7497             </actions>
7498         </permacrud>
7499         </class>
7500         <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">
7501                 <fields oils_persist:primary="code">
7502                         <field name="code" reporter:datatype="id" />
7503                         <field name="marc_code" reporter:datatype="text"/>
7504                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7505                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7506                         <field name="rtl" reporter:datatype="bool"/>
7507                 </fields>
7508                 <links/>
7509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7510             <actions>
7511                 <create permission="CREATE_LOCALE" global_required="true"/>
7512                 <retrieve/>
7513                 <update permission="UPDATE_LOCALE" global_required="true"/>
7514                 <delete permission="DELETE_LOCALE" global_required="true"/>
7515             </actions>
7516         </permacrud>
7517         </class>
7518         <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">
7519                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7520                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7521                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7522                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7523             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7524                 </fields>
7525                 <links>
7526                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7527                 </links>
7528         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7529             <actions>
7530                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7531                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7532                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7533                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7534             </actions>
7535         </permacrud>
7536         </class>
7537
7538         <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">
7539                 <fields oils_persist:primary="id">
7540                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7541                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7542                 </fields>
7543                 <links/>
7544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7545             <actions>
7546                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7547                 <retrieve/>
7548                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7549                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7550             </actions>
7551         </permacrud>
7552         </class>
7553
7554         <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">
7555                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7556                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7557                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7558                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7559                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7560                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7561                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7562                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7563                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7564                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7565                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7566                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7567                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7568                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7569                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7570                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7571                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7572                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7573                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7574                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7575                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7576                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7577                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7578                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7579                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7580                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7581                 </fields>
7582                 <links>
7583                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7584                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7585                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7586                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7587                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7588                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7589                 </links>
7590         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7591             <actions>
7592                 <create permission="user_request.create">
7593                     <context link="usr" field="home_ou"/>
7594                                 </create>
7595                 <retrieve permission="user_request.view">
7596                     <context link="usr" field="home_ou"/>
7597                                 </retrieve>
7598                 <update permission="user_request.update">
7599                     <context link="usr" field="home_ou"/>
7600                                 </update>
7601                 <delete permission="user_request.delete">
7602                     <context link="usr" field="home_ou"/>
7603                                 </delete>
7604             </actions>
7605         </permacrud>
7606         </class>
7607
7608         <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">
7609                 <fields oils_persist:primary="code">
7610                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7611                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7612                 </fields>
7613                 <links/>
7614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7615             <actions>
7616                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7617                 <retrieve/>
7618                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7619                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7620             </actions>
7621         </permacrud>
7622         </class>
7623
7624         <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">
7625                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7626                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7627                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7628                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7629                         <field reporter:label="Ratio" name="ratio" />
7630                 </fields>
7631                 <links>
7632                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7633                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7634                 </links>
7635                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7636                         <actions>
7637                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7638                                 <retrieve/>
7639                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7640                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7641                         </actions>
7642                 </permacrud>
7643         </class>
7644
7645         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7646                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7647                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7648                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7649                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7650                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7651                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7652                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7653                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7654                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7655                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7656                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7657                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7658                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7659                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7660                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7661                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7662                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7663                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7664                 </fields>
7665                 <links>
7666                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7667                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7668             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7669             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7670             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7671                 </links>
7672         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7673             <actions>
7674                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7675                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7676                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7677                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7678             </actions>
7679         </permacrud>
7680         </class>
7681
7682         <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">
7683                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7684                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7685                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7686                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7687                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7688                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7689                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7690                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7691                 </fields>
7692                 <links>
7693                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7694                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7695                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7696                 </links>
7697         </class>
7698
7699         <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">
7700                 <fields oils_persist:primary="code">
7701                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7702                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7703                 </fields>
7704                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7705             <actions>
7706                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7707                 <retrieve/>
7708                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7709                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7710             </actions>
7711                 </permacrud>
7712         </class>
7713
7714         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7715                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7716                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7717                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7718                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7719                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7720                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7721                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7722                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7723                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7724                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7725                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7726                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7727                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7728                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7729                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7730                 </fields>
7731                 <links>
7732                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7733                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7734                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7735                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7736                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7737                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7738                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7739                 </links>
7740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7741             <actions>
7742                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7743                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7744                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7745                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7746             </actions>
7747         </permacrud>
7748         </class>
7749
7750         <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">
7751                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7752                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7753                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7754                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7755                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7756                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7757                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7758                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7759                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7760                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7761                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7762                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7763                 </fields>
7764                 <links>
7765                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7766                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7767                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7768                 </links>
7769         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7770             <actions>
7771                 <create   permission="ADMIN_INVOICE">
7772                                         <context link="invoice" field="receiver"/>
7773                                 </create>
7774                 <retrieve permission="ADMIN_INVOICE">
7775                                         <context link="invoice" field="receiver"/>
7776                                 </retrieve>
7777                 <update   permission="ADMIN_INVOICE">
7778                                         <context link="invoice" field="receiver"/>
7779                                 </update>
7780                                 <delete   permission="ADMIN_INVOICE">
7781                                         <context link="invoice" field="receiver"/>
7782                                 </delete>
7783             </actions>
7784         </permacrud>
7785         </class>
7786
7787         <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">
7788                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7789                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7790                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7791                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7792                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7793                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7794                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7795                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7796                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7797                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7798                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7799                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7800                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7801                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7802                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7803                 </fields>
7804                 <links>
7805                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7806                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7807                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7808                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7809                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7810                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7811                 </links>
7812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7813             <actions>
7814                 <create   permission="ADMIN_INVOICE">
7815                                         <context link="invoice" field="receiver"/>
7816                                 </create>
7817                 <retrieve permission="ADMIN_INVOICE">
7818                                         <context link="invoice" field="receiver"/>
7819                                 </retrieve>
7820                 <update   permission="ADMIN_INVOICE">
7821                                         <context link="invoice" field="receiver"/>
7822                                 </update>
7823                                 <delete   permission="ADMIN_INVOICE">
7824                                         <context link="invoice" field="receiver"/>
7825                                 </delete>
7826             </actions>
7827         </permacrud>
7828         </class>
7829
7830         <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">
7831                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7832                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7833                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7834                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7835                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7836                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7837                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7838                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7839                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7840                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7841                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7842                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7843                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7844                 </fields>
7845                 <links>
7846                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7847                 </links>
7848         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7849             <actions>
7850                 <create permission="ADMIN_PROVIDER">
7851                     <context link="provider" field="owner"/>
7852                 </create>
7853                 <retrieve permission="ADMIN_PROVIDER">
7854                     <context link="provider" field="owner"/>
7855                 </retrieve>
7856                 <update permission="ADMIN_PROVIDER">
7857                     <context link="provider" field="owner"/>
7858                 </update>
7859                 <delete permission="ADMIN_PROVIDER">
7860                     <context link="provider" field="owner"/>
7861                 </delete>
7862             </actions>
7863         </permacrud>
7864         </class>
7865
7866         <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">
7867                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7868                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7869                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7870                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7871                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7872                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7873                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7874         </fields>
7875                 <links>
7876                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7877                 </links>
7878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7879             <actions>
7880                 <create permission="ADMIN_PROVIDER">
7881                     <context link="provider" field="owner"/>
7882                 </create>
7883                 <retrieve permission="ADMIN_PROVIDER">
7884                     <context link="provider" field="owner"/>
7885                 </retrieve>
7886                 <update permission="ADMIN_PROVIDER">
7887                     <context link="provider" field="owner"/>
7888                 </update>
7889                 <delete permission="ADMIN_PROVIDER">
7890                     <context link="provider" field="owner"/>
7891                 </delete>
7892             </actions>
7893         </permacrud>
7894     </class>
7895         <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">
7896                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7897                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7898                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7899                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7900                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7901                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7902                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7903                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7904                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7905                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7906                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7907                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7908                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7909                 </fields>
7910                 <links>
7911                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7912                 </links>
7913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7914             <actions>
7915                 <create permission="ADMIN_PROVIDER">
7916                     <context link="contact" jump='provider' field="owner"/>
7917                 </create>
7918                 <retrieve permission="ADMIN_PROVIDER">
7919                     <context link="contact" jump='provider' field="owner"/>
7920                 </retrieve>
7921                 <update permission="ADMIN_PROVIDER">
7922                     <context link="contact" jump='provider' field="owner"/>
7923                 </update>
7924                 <delete permission="ADMIN_PROVIDER">
7925                     <context link="contact" jump='provider' field="owner"/>
7926                 </delete>
7927             </actions>
7928         </permacrud>
7929         </class>
7930
7931         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7932                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7933                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7934                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7935                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7936                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7937                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7938                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7939                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7940                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7941                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7942                 </fields>
7943                 <links>
7944                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7945                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7946                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7947                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7948                 </links>
7949         </class>
7950
7951         <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">
7952                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7953                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7954                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7955                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7956                 </fields>
7957                 <links>
7958             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7959                 </links>
7960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7961                         <actions>
7962                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7963                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7964                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7965                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7966                         </actions>
7967                 </permacrud>
7968         </class>
7969
7970         <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">
7971                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7972                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7973                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7974                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7975                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7976                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7977                 </fields>
7978                 <links>
7979                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7980                 </links>
7981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7982                         <actions>
7983                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7984                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7985                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7986                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7987                         </actions>
7988                 </permacrud>
7989         </class>
7990
7991         <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">
7992                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7993                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7994                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7995                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7996                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7997                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7998                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7999                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8000                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8001                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8002                 </fields>
8003                 <links>
8004                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8005                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8006             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8007             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8008                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8009                 </links>
8010         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8011             <actions>
8012                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8013                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8014                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8015                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8016             </actions>
8017         </permacrud>
8018         </class>
8019
8020         <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">
8021                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8022                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8023                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8024                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8025                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8026                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8027                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8028                 </fields>
8029                 <links>
8030                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8031                 </links>
8032                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8033                         <actions>
8034                                 <create permission="ADMIN_FUNDING_SOURCE">
8035                     <context link="funding_source" field="owner"/>
8036                 </create>
8037                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8038                     <context link="funding_source" field="owner"/>
8039                 </retrieve>
8040                                 <update permission="ADMIN_FUNDING_SOURCE">
8041                     <context link="funding_source" field="owner"/>
8042                 </update>
8043                                 <delete permission="ADMIN_FUNDING_SOURCE">
8044                     <context link="funding_source" field="owner"/>
8045                 </delete>
8046                         </actions>
8047                 </permacrud>
8048         </class>
8049
8050         <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">
8051                 <fields oils_persist:primary="id">
8052                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8053                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8054                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8055                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8056                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8057                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8058                 </fields>
8059                 <links>
8060                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8061                 </links>
8062         </class>
8063
8064         <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">
8065                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8066                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8067                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8068                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8069                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8070                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8071                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8072                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8073                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8074                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8075                 </fields>
8076                 <links>
8077                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8078                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8079                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8080                 </links>
8081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8082                         <actions>
8083                                 <create permission="ADMIN_ACQ_FUND">
8084                     <context link="fund" field="org"/>
8085                 </create>
8086                                 <retrieve permission="ADMIN_ACQ_FUND">
8087                     <context link="fund" field="org"/>
8088                 </retrieve>
8089                                 <update permission="ADMIN_ACQ_FUND">
8090                     <context link="fund" field="org"/>
8091                 </update>
8092                                 <delete permission="ADMIN_ACQ_FUND">
8093                     <context link="fund" field="org"/>
8094                 </delete>
8095                         </actions>
8096                 </permacrud>
8097         </class>
8098
8099         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8100                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8101                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8102                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8103                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8104                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8105                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8106                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8107                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8108                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8109                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8110                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8111                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8112                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8113                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8114                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8115                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8116                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8117                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8118                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8119                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8120                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8121                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8122                 </fields>
8123                 <links>
8124                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8125                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8126             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8127             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8128             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8129             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8130             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8131             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8132             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8133             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8134             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8135                 </links>
8136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8137             <actions>
8138                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8139                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8140                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8141                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8142             </actions>
8143         </permacrud>
8144         </class>
8145
8146         <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">
8147                 <fields oils_persist:primary="fund">
8148                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8149                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8150                 </fields>
8151                 <links>
8152                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8153                 </links>
8154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8155             <actions>
8156                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8157                                         <context link="fund" field="org" />
8158                 </retrieve>
8159             </actions>
8160         </permacrud>
8161         </class>
8162
8163         <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">
8164                 <fields oils_persist:primary="fund">
8165                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8166                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8167                 </fields>
8168                 <links>
8169                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8170                 </links>
8171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8172             <actions>
8173                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8174                                         <context link="fund" field="org" />
8175                 </retrieve>
8176             </actions>
8177         </permacrud>
8178         </class>
8179
8180         <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">
8181                 <fields oils_persist:primary="fund">
8182                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8183                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8184                 </fields>
8185                 <links>
8186                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8187                 </links>
8188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8189             <actions>
8190                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8191                                         <context link="fund" field="org" />
8192                 </retrieve>
8193             </actions>
8194         </permacrud>
8195         </class>
8196
8197         <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">
8198                 <fields oils_persist:primary="fund">
8199                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8200                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8201                 </fields>
8202                 <links>
8203                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8204                 </links>
8205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8206             <actions>
8207                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8208                                         <context link="fund" field="org" />
8209                 </retrieve>
8210             </actions>
8211         </permacrud>
8212         </class>
8213
8214         <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">
8215                 <fields oils_persist:primary="fund">
8216                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8217                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8218                 </fields>
8219                 <links>
8220                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8221                 </links>
8222         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8223             <actions>
8224                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8225                                         <context link="fund" field="org" />
8226                 </retrieve>
8227             </actions>
8228         </permacrud>
8229         </class>
8230
8231    <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">
8232         <fields oils_persist:primary="fund">
8233             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8234             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8235         </fields>
8236         <links>
8237             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8238         </links>
8239     </class>
8240
8241    <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">
8242         <fields oils_persist:primary="fund">
8243             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8244             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8245         </fields>
8246         <links>
8247             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8248         </links>
8249     </class>
8250
8251    <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">
8252         <fields oils_persist:primary="fund">
8253             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8254             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8255         </fields>
8256         <links>
8257             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8258         </links>
8259     </class>
8260
8261    <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">
8262         <fields oils_persist:primary="fund">
8263             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8264             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8265         </fields>
8266         <links>
8267             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8268         </links>
8269     </class>
8270
8271    <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">
8272         <fields oils_persist:primary="fund">
8273             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8274             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8275         </fields>
8276         <links>
8277             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8278         </links>
8279     </class>
8280
8281         <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">
8282                 <fields oils_persist:primary="funding_source">
8283                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8284                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8285                 </fields>
8286                 <links>
8287                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8288                 </links>
8289         </class>
8290
8291         <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">
8292                 <fields oils_persist:primary="funding_source">
8293                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8294                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8295                 </fields>
8296                 <links>
8297                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8298                 </links>
8299         </class>
8300
8301         <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">
8302                 <fields oils_persist:primary="funding_source">
8303                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8304                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8305                 </fields>
8306                 <links>
8307                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8308                 </links>
8309         </class>
8310
8311         <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">
8312                 <fields oils_persist:primary="fund">
8313                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8314                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8315                 </fields>
8316                 <links>
8317                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8318                 </links>
8319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8320             <actions>
8321                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8322                                         <context link="fund" field="org" />
8323                 </retrieve>
8324             </actions>
8325         </permacrud>
8326     </class>
8327     <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">
8328         <oils_persist:source_definition><![CDATA[
8329             SELECT
8330                 acqf.*,
8331                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8332                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8333                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8334                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8335             FROM
8336                 acq.fund acqf
8337                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8338                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8339                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8340                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8341         ]]></oils_persist:source_definition>
8342         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8343             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8344             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8345             <field reporter:label="Name" name="name" reporter:datatype="text" />
8346             <field reporter:label="Year" name="year" reporter:datatype="int" />
8347             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8348             <field reporter:label="Code" name="code" reporter:datatype="text" />
8349             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8350             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8351             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8352             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8353             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8354
8355             <!-- non fund-native fields -->
8356             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8357             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8358             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8359             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8360         </fields>
8361         <links>
8362             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8363             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8364             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8365         </links>
8366         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8367             <actions>
8368                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8369             </actions>
8370         </permacrud>
8371         </class>
8372         <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">
8373                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8374                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8375                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8376                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8377                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8378                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8379                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8380                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8381                 </fields>
8382                 <links>
8383                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8384                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8385                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8386                 </links>
8387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8388                         <actions>
8389                                 <create permission="ADMIN_ACQ_FUND">
8390                     <context link="fund" field="org"/>
8391                 </create>
8392                                 <retrieve permission="ADMIN_ACQ_FUND">
8393                     <context link="fund" field="org"/>
8394                 </retrieve>
8395                                 <update permission="ADMIN_ACQ_FUND">
8396                     <context link="fund" field="org"/>
8397                 </update>
8398                                 <delete permission="ADMIN_ACQ_FUND">
8399                     <context link="fund" field="org"/>
8400                 </delete>
8401                         </actions>
8402                 </permacrud>
8403         </class>
8404
8405     <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">
8406         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8407             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8408             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8409             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8410             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8411             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8412             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8413             <field reporter:label="Note" name="note" reporter:datatype="text" />
8414             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8415         </fields>
8416         <links>
8417             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8418             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8419             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8420         </links>
8421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8422                         <actions>
8423                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8424                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8425                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8426                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8427                         </actions>
8428                 </permacrud>
8429     </class>
8430
8431         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8432                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8433                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8434                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8435                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8436                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8437                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8438                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8439                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8440                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8441                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8442                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8443                 </fields>
8444                 <links>
8445                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8446                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8447                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8448                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8449                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8450                 </links>
8451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8452                         <actions>
8453                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8454                         </actions>
8455                 </permacrud>
8456         </class>
8457
8458         <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">
8459                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8460                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8461                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8462                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8463                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8464                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8465                 </fields>
8466                 <links>
8467                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8468                 </links>
8469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8470                         <actions>
8471                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8472                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8473                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8474                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8475                         </actions>
8476                 </permacrud>
8477         </class>
8478
8479         <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">
8480                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8481                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8482                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8483                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8484                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8485                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8486                         <field reporter:label="State" name="state" reporter:datatype="text" />
8487                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8488                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8489                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8490                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8491                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8492                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8493                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8494                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8495                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8496                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8497                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8498                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8499                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8500                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8501                 </fields>
8502                 <links>
8503                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8504                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8505                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8506                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8507                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8508                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8509                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8510                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8511                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8512                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8513                 </links>
8514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8515                         <actions>
8516                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8517                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8518                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8519                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8520                         </actions>
8521                 </permacrud>
8522         </class>
8523
8524         <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">
8525                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8526                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8527                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8528                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8529                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8530                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8531                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8532                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8533                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8534                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8535                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8536                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8537                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8538                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8539                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8540                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8541                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8542                 </fields>
8543                 <links>
8544                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8545                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8546                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8547                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8548                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8549                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8550                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8551                 </links>
8552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8553             <actions>
8554                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8555             </actions>
8556                 </permacrud>
8557         </class>
8558
8559         <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">
8560                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8561                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8562                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8563                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8564                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8565                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8566                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8567                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8568                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8569                 </fields>
8570                 <links>
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="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8574                 </links>
8575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8576             <actions>
8577                 <create permission="CREATE_PURCHASE_ORDER">
8578                     <context link="purchase_order" field="ordering_agency"/>
8579                 </create>
8580                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8581                     <context link="purchase_order" field="ordering_agency"/>
8582                 </retrieve>
8583                 <update permission="CREATE_PURCHASE_ORDER">
8584                     <context link="purchase_order" field="ordering_agency"/>
8585                 </update>
8586                 <delete permission="CREATE_PURCHASE_ORDER">
8587                     <context link="purchase_order" field="ordering_agency"/>
8588                 </delete>
8589             </actions>
8590                 </permacrud>
8591         </class>
8592
8593         <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">
8594                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8595                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8596                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8597                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8598                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8599                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8600                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8601                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8602                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8603                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8604                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8605                 </fields>
8606                 <links>
8607                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8608                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8609                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8610                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8611                 </links>
8612                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8613             <actions>
8614                 <create permission="CREATE_PURCHASE_ORDER">
8615                     <context link="purchase_order" field="ordering_agency"/>
8616                 </create>
8617                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8618                     <context link="purchase_order" field="ordering_agency"/>
8619                 </retrieve>
8620                 <update permission="CREATE_PURCHASE_ORDER">
8621                     <context link="purchase_order" field="ordering_agency"/>
8622                 </update>
8623                 <delete permission="CREATE_PURCHASE_ORDER">
8624                     <context link="purchase_order" field="ordering_agency"/>
8625                 </delete>
8626             </actions>
8627                 </permacrud>
8628         </class>
8629
8630         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8631                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8632                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8633                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8634                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8635                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8636                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8637                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8638                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8639                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8640                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8641                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8642                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8643                         <field reporter:label="State" name="state" reporter:datatype="text" />
8644                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8645                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8646                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8647                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8648                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8649                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8650                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8651                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8652                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8653                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8654                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8655                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8656                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8657                 </fields>
8658                 <links>
8659                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8660                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8661                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8662                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8663                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8664                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8665                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8666                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8667                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8668                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8669                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8670                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8671                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8672                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8673                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8674                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8675                 </links>
8676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8677                         <actions>
8678                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8679                                         <context link="purchase_order" field="ordering_agency"/>
8680                                         <context link="picklist" field="org_unit"/>
8681                                 </retrieve>
8682                         </actions>
8683                 </permacrud>
8684         </class>
8685
8686         <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">
8687                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8688                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8689                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8690                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8691                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8692                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8693                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8694                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8695                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8696                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8697                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8698                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8699                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8700                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8701                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8702                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8703                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8704                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8705                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8706                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8707                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8708                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8709                 </fields>
8710                 <links>
8711                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8712                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8713                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8714                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8715                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8716                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8717                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8718                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8719                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8720                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8721                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8722                 </links>
8723                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8724                         <actions>
8725                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8726                                         <context link="purchase_order" field="ordering_agency"/>
8727                                         <context link="picklist" field="org_unit"/>
8728                                 </retrieve>
8729                         </actions>
8730                 </permacrud>
8731         </class>
8732
8733         <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">
8734                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8735                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8736                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8737                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8738                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8739                 </fields>
8740                 <links>
8741                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8742                 </links>
8743                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8744                         <actions>
8745                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8746                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8747                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8748                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8749                         </actions>
8750                 </permacrud>
8751         </class>
8752
8753         <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">
8754                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8755                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8756                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8757                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8758                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8759                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8760                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8761                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8762                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8763                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8764                 </fields>
8765                 <links>
8766                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8767                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8768                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8769                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8770                 </links>
8771         </class>
8772
8773         <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">
8774                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8775                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8776                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8777                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8778                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8779                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8780                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8781                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8782                 </fields>
8783                 <links>
8784                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8785                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8786                 </links>
8787         </class>
8788
8789         <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">
8790                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8791                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8792                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8793                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8794                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8795                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8796                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8797                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8798                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8799                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8800                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8801                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8802                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8803                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8804                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8805                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8806                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8807                 </fields>
8808                 <links>
8809                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8810                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8811                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8812                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8813                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8814                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8815                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8816                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8817                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8818                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8819                 </links>
8820         </class>
8821
8822         <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">
8823                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8824                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8825                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8826                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8827                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8828                 </fields>
8829                 <links/>
8830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8831                         <actions>
8832                                 <retrieve />
8833                         </actions>
8834                 </permacrud>
8835         </class>
8836
8837         <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">
8838                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8839                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8840                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8841                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8842                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8843                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8844             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8845                 </fields>
8846                 <links/>
8847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8848             <actions>
8849                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8850                 <retrieve />
8851                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8852                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8853             </actions>
8854         </permacrud>
8855         </class>
8856
8857         <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">
8858                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8859                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8860                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8861                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8862                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8863                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8864                 </fields>
8865                 <links/>
8866         </class>
8867         <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">
8868                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8869                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8870                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8871                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8872                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8873                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8874                 </fields>
8875                 <links>
8876                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8877                 </links>
8878         </class>
8879
8880         <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">
8881             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8882                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8883                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8884                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8885                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8886                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8887                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8888         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8889
8890             </fields>
8891             <links>
8892                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8893             </links>
8894             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8895                 <actions>
8896                     <create permission="ADMIN_PROVIDER">
8897                         <context link="provider" field="owner"/>
8898                     </create>
8899                     <retrieve permission="ADMIN_PROVIDER">
8900                         <context link="provider" field="owner"/>
8901                     </retrieve>
8902                     <update permission="ADMIN_PROVIDER">
8903                         <context link="provider" field="owner"/>
8904                     </update>
8905                     <delete permission="ADMIN_PROVIDER">
8906                         <context link="provider" field="owner"/>
8907                     </delete>
8908                 </actions>
8909             </permacrud>
8910         </class>
8911         
8912         <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">
8913             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8914                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8915                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8916                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8917                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8918             </fields>
8919             <links>
8920                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8921             </links>
8922             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8923                 <actions>
8924                     <create permission="ADMIN_PROVIDER">
8925                         <context link="provider" field="owner"/>
8926                     </create>
8927                     <retrieve permission="ADMIN_PROVIDER">
8928                         <context link="provider" field="owner"/>
8929                     </retrieve>
8930                     <update permission="ADMIN_PROVIDER">
8931                         <context link="provider" field="owner"/>
8932                     </update>
8933                     <delete permission="ADMIN_PROVIDER">
8934                         <context link="provider" field="owner"/>
8935                     </delete>
8936                 </actions>
8937             </permacrud>
8938         </class>
8939         
8940         <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">
8941             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8942                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8943                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8944                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8945                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8946                 </fields>
8947                 <links/>
8948         </class>
8949
8950         <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">
8951                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8952                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8953                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8954                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8955                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8956                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8957                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8958                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8959                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8960                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8961                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8962                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8963                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8964                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8965                 </fields>
8966                 <links>
8967                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8968                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8969                 </links>
8970         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8971             <actions>
8972                 <create permission="ADMIN_PROVIDER">
8973                     <context link="provider" field="owner"/>
8974                 </create>
8975                 <retrieve permission="ADMIN_PROVIDER">
8976                     <context link="provider" field="owner"/>
8977                 </retrieve>
8978                 <update permission="ADMIN_PROVIDER">
8979                     <context link="provider" field="owner"/>
8980                 </update>
8981                 <delete permission="ADMIN_PROVIDER">
8982                     <context link="provider" field="owner"/>
8983                 </delete>
8984             </actions>
8985         </permacrud>
8986         </class>
8987
8988         <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">
8989                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8990                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8991                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8992                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8993                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8994                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8995                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8996                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8997                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8998                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8999                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9000                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9001                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9002                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9003                 </fields>
9004                 <links>
9005                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9006                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9007                 </links>
9008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9009             <actions>
9010                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9011                     <context link="account" jump="provider" field="owner"/>
9012                 </retrieve>
9013                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9014                     <context link="account" jump="provider" field="owner"/>
9015                 </update>
9016                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9017                     <context link="account" jump="provider" field="owner"/>
9018                 </delete>
9019             </actions>
9020         </permacrud>
9021         </class>
9022
9023
9024         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9025                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9026                         <field name="id" reporter:datatype="id" />
9027                         <field name="parent" reporter:datatype="link"/>
9028                         <field name="owner" reporter:datatype="link"/>
9029                         <field name="create_time" reporter:datatype="timestamp"/>
9030                         <field name="name" reporter:datatype="text"/>
9031                         <field name="shared" reporter:datatype="bool"/>
9032                         <field name="share_with" reporter:datatype="link"/>
9033                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9034                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9035                 </fields>
9036                 <links>
9037                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9038                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9039                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9040                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9041                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9042                 </links>
9043         </class>
9044         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9045                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9046                         <field name="id" reporter:datatype="id" />
9047                         <field name="parent" reporter:datatype="link"/>
9048                         <field name="owner" reporter:datatype="link"/>
9049                         <field name="create_time" reporter:datatype="timestamp"/>
9050                         <field name="name" reporter:datatype="text"/>
9051                         <field name="shared" reporter:datatype="bool"/>
9052                         <field name="share_with" reporter:datatype="link"/>
9053                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9054                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9055                 </fields>
9056                 <links>
9057                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9058                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9059                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9060                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9061                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9062                 </links>
9063         </class>
9064         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9065                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9066                         <field name="id" reporter:datatype="id" />
9067                         <field name="parent" reporter:datatype="link"/>
9068                         <field name="owner" reporter:datatype="link"/>
9069                         <field name="create_time" reporter:datatype="timestamp"/>
9070                         <field name="name" reporter:datatype="text"/>
9071                         <field name="shared" reporter:datatype="bool"/>
9072                         <field name="share_with" reporter:datatype="link"/>
9073                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9074                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9075                 </fields>
9076                 <links>
9077                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9078                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9079                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9080                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9081                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9082                 </links>
9083         </class>
9084         <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">
9085                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9086                         <field name="id" reporter:datatype="id" />
9087                         <field name="owner" reporter:datatype="link"/>
9088                         <field name="create_time" reporter:datatype="timestamp"/>
9089                         <field name="name" reporter:datatype="text"/>
9090                         <field name="data" reporter:datatype="text"/>
9091                         <field name="folder" reporter:datatype="link"/>
9092                         <field name="description" reporter:datatype="text"/>
9093                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9094                 </fields>
9095                 <links>
9096                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9097                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9098                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9099                 </links>
9100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9101             <actions>
9102                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9103                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9104                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9105                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9106             </actions>
9107         </permacrud>
9108         </class>
9109         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9110                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9111                         <field name="id" reporter:datatype="id" />
9112                         <field name="owner" reporter:datatype="link"/>
9113                         <field name="create_time" reporter:datatype="timestamp"/>
9114                         <field name="template" reporter:datatype="link"/>
9115                         <field name="data" reporter:datatype="text"/>
9116                         <field name="folder" reporter:datatype="link"/>
9117                         <field name="recur" reporter:datatype="bool"/>
9118                         <field name="recurrence" reporter:datatype="interval"/>
9119                         <field name="name" reporter:datatype="text"/>
9120                         <field name="description" reporter:datatype="text"/>
9121                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9122                 </fields>
9123                 <links>
9124                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9125                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9126                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9127                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9128                 </links>
9129         </class>
9130         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9131                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9132                         <field name="id" reporter:datatype="id" />
9133                         <field name="runner" reporter:datatype="link"/>
9134                         <field name="start_time" reporter:datatype="timestamp"/>
9135                         <field name="complete_time" reporter:datatype="timestamp"/>
9136                         <field name="run_time" reporter:datatype="timestamp"/>
9137                         <field name="email" reporter:datatype="text"/>
9138                         <field name="excel_format" reporter:datatype="bool"/>
9139                         <field name="csv_format" reporter:datatype="bool"/>
9140                         <field name="html_format" reporter:datatype="bool"/>
9141                         <field name="error_code" reporter:datatype="int"/>
9142                         <field name="error_text" reporter:datatype="text"/>
9143                         <field name="report" reporter:datatype="link"/>
9144                         <field name="folder" reporter:datatype="link"/>
9145                         <field name="chart_pie" reporter:datatype="bool"/>
9146                         <field name="chart_bar" reporter:datatype="bool"/>
9147                         <field name="chart_line" reporter:datatype="bool"/>
9148                 </fields>
9149                 <links>
9150                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9151                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9152                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9153                 </links>
9154         </class>
9155         <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">
9156                 <fields oils_persist:primary="id">
9157                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9158                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9159                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9160                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9161                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9162                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9163                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9164                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9165                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9166                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9167                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9168                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9169                 </fields>
9170                 <links>
9171                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9172                 </links>
9173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9174                         <actions>
9175                                 <retrieve />
9176                         </actions>
9177                 </permacrud>
9178         </class>
9179         <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">
9180                 <fields oils_persist:primary="id">
9181                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9182                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9183                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9184                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9185                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9186                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9187                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9188                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9189                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9190                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9191                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9192                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9193                 </fields>
9194                 <links>
9195                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9196                 </links>
9197         </class>
9198         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9199                 <fields oils_persist:primary="id">
9200                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9201                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9202                         <field reporter:label="Fingerprint" name="fingerprint" />
9203                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9204                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9205                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9206                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9207                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9208                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9209                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9210                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9211                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9212                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9213                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9214                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9215                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9216                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9217                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9218                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9219                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9220                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9221                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9222                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9223                 </fields>
9224                 <links>
9225                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9226                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9227                 </links>
9228         </class>
9229         <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">
9230                 <fields oils_persist:primary="id">
9231                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9232                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9233                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9234                 </fields>
9235                 <links>
9236                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9237                 </links>
9238         </class>
9239         <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">
9240                 <fields oils_persist:primary="id">
9241                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9242                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9243                 </fields>
9244                 <links>
9245                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9246                 </links>
9247         </class>
9248         <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">
9249                 <fields oils_persist:primary="id">
9250                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9251                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9252                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9253                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9254                 </fields>
9255                 <links>
9256                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9257                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9258                 </links>
9259         </class>
9260         <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">
9261                 <fields oils_persist:primary="xact">
9262                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9263                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9264                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9265                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9266                 </fields>
9267                 <links>
9268                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9269                 </links>
9270         </class>
9271         <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">
9272                 <fields oils_persist:primary="xact">
9273                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9274                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9275                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9276                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9277                 </fields>
9278                 <links>
9279                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9280                 </links>
9281         </class>
9282         <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)">
9283                 <fields oils_persist:primary="id">
9284                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9285                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9286                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9287                 </fields>
9288                 <links>
9289                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9290                 </links>
9291         </class>
9292         <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">
9293                 <fields oils_persist:primary="id">
9294                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9295                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9296                 </fields>
9297                 <links>
9298                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9299                 </links>
9300         </class>
9301         <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">
9302                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9303                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9304                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9305                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9306                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9307                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9308                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9309                 </fields>
9310                 <links>
9311                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9312                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9313                 </links>
9314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9315                         <actions>
9316                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9317                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9318                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9319                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9320                         </actions>
9321                 </permacrud>
9322         </class>
9323         <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">
9324                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9325                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9326                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9327                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9328                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9329                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9330                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9331                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9332                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9333                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9334                 </fields>
9335                 <links>
9336                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9337                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9338                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9339                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9340                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9341                 </links>
9342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9343                         <actions>
9344                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9345                                         <context link="formula" field="owner"/>
9346                                 </create>
9347                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9348                                         <context link="formula" field="owner"/>
9349                                 </retrieve>
9350                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9351                                         <context link="formula" field="owner"/>
9352                                 </update>
9353                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9354                                         <context link="formula" field="owner"/>
9355                                 </delete>
9356                         </actions>
9357                 </permacrud>
9358         </class>
9359
9360         <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">
9361                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9362                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9363                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9364                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9365                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9366                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9367                 </fields>
9368                 <links>
9369                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9370                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9371                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9372                 </links>
9373                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9374                         <actions>
9375                                 <create permission="CREATE_PURCHASE_ORDER">
9376                                         <context link="formula" field="owner"/>
9377                 </create>
9378                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9379                                         <context link="formula" field="owner"/>
9380                 </retrieve>
9381                                 <update permission="CREATE_PURCHASE_ORDER">
9382                                         <context link="formula" field="owner"/>
9383                 </update>
9384                                 <delete permission="CREATE_PURCHASE_ORDER">
9385                                         <context link="formula" field="owner"/>
9386                 </delete>
9387                         </actions>
9388                 </permacrud>
9389         </class>
9390
9391         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9392                 <fields oils_persist:primary="id">
9393                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9394                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9395                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9396                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9397                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9398                 </fields>
9399                 <links>
9400                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9401                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9402                 </links>
9403         </class>
9404
9405         <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">
9406                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9407                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9408                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9409                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9410                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9411                 </fields>
9412                 <links>
9413                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9414                 </links>
9415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9416                         <actions>
9417                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9418                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9419                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9420                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9421                         </actions>
9422                 </permacrud>
9423         </class>
9424
9425         <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">
9426                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9427                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9428                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9429                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9430                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9431                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9432                 </fields>
9433                 <links>
9434                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9435                 </links>
9436                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9437                         <actions>
9438                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9439                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9440                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9441                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9442                         </actions>
9443                 </permacrud>
9444         </class>
9445
9446         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9447                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9448                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9449                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9450                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9451                 </fields>
9452                 <links>
9453                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9454                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9455                 </links>
9456         </class>
9457
9458         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9459                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9460                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9461                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9462                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9463                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9464                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9465                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9466                 </fields>
9467                 <links>
9468                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9469                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9470                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9471                 </links>
9472         </class>
9473
9474         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9475                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9476                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9477                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9478                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9479                 </fields>
9480                 <links>
9481                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9482                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9483                 </links>
9484         </class>
9485
9486         <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">
9487                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9488                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9489                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9490                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9491                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9492                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9493                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9494                 </fields>
9495                 <links>
9496                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9497                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9498                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9499                 </links>
9500         </class>
9501
9502         <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">
9503                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9504                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9505                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9506                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9507                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9508                 </fields>
9509                 <links>
9510                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9511                 </links>
9512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9513             <actions>
9514                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9515                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9516                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9517                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9518             </actions>
9519                 </permacrud>
9520         </class>
9521
9522         <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">
9523                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9524                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9525                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9526                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9527                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9528                 </fields>
9529                 <links>
9530                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9531                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9532                 </links>
9533                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9534                         <actions>
9535                                 <create permission="ADMIN_CLAIM_POLICY">
9536                                         <context link="claim_policy" field="org_unit"/>
9537                 </create>
9538                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9539                                         <context link="claim_policy" field="org_unit"/>
9540                 </retrieve>
9541                                 <update permission="ADMIN_CLAIM_POLICY">
9542                                         <context link="claim_policy" field="org_unit"/>
9543                 </update>
9544                                 <delete permission="ADMIN_CLAIM_POLICY">
9545                                         <context link="claim_policy" field="org_unit"/>
9546                 </delete>
9547                         </actions>
9548                 </permacrud>
9549         </class>
9550
9551     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9552         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9553             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9554             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9555             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9556             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9557             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9558             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9559             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9560             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9561             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9562             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9563             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9564             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9565             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9566             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9567             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9568             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9569         </fields>
9570         <links>
9571             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9572         </links>
9573     </class>
9574
9575     <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">
9576         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9577             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9578             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9579             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9580             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9581             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9582         </fields>
9583     </class>
9584
9585     <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">
9586         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9587             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9588             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9589             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9590             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9591             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9592             <field reporter:label="City" name="city" reporter:datatype="text"/>
9593             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9594             <field reporter:label="State" name="state" reporter:datatype="text"/>
9595             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9596             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9597             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9598         </fields>
9599     </class>
9600
9601     <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">
9602         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9603             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9604             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9605             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9606             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9607             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9608             <field reporter:label="City" name="city" reporter:datatype="text"/>
9609             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9610             <field reporter:label="State" name="state" reporter:datatype="text"/>
9611             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9612             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9613             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9614         </fields>
9615     </class>
9616
9617     <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">
9618         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9619             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9620             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9621             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9622             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9623             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9624             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9625         </fields>
9626     </class>
9627
9628     <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">
9629         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
9630             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9631             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9632             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9633             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
9634             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
9635             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9636         </fields>
9637     </class>
9638
9639         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9640                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9641                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9642                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9643                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9644                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9645                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9646                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9647                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9648                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9649                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9650                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9651                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9652                 </fields>
9653                 <links>
9654                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9655                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9656                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9657                 </links>
9658         </class>
9659
9660         <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">
9661                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9662                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9663                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9664                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9665                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9666                 </fields>
9667                 <links>
9668                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9669                 </links>
9670         </class>
9671
9672     <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">
9673         <fields>
9674             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9675             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9676             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9677         </fields>
9678                 <links>
9679                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9680                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9681                 </links>
9682     </class>
9683
9684     <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">
9685         <fields>
9686             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9687             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9688         </fields>
9689                 <links>
9690                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9691                 </links>
9692     </class>
9693
9694     <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">
9695         <fields>
9696             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9697             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9698             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9699         </fields>
9700                 <links>
9701                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9702                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9703                 </links>
9704     </class>
9705
9706     <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">
9707         <fields>
9708             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9709             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9710         </fields>
9711                 <links>
9712                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9713                 </links>
9714     </class>
9715
9716     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9717                 <oils_persist:source_definition>
9718
9719             SELECT  DISTINCT l.*
9720               FROM  action.unfulfilled_hold_loops l
9721                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9722               WHERE l.count = m.max
9723
9724                 </oils_persist:source_definition>
9725         <fields>
9726             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9727             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9728             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9729         </fields>
9730                 <links>
9731                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9732                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9733                 </links>
9734     </class>
9735
9736         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9737                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9738                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9739                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9740                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9741                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9742                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9743                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9744                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9745                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9746                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9747                 </fields>
9748                 <links>
9749                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9750                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9751                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9752                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9753                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9754                 </links>
9755         </class>
9756
9757         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9758                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9759                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9760                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9761                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9762                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9763                 </fields>
9764                 <links>
9765                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9766                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9767                 </links>
9768         </class>
9769
9770         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9771                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9772                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9773                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9774                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9775                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9776                 </fields>
9777                 <links>
9778                 </links>
9779         </class>
9780
9781         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9782                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9783                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9784                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9785                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9786                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9787                 </fields>
9788                 <links>
9789                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9790                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9791                 </links>
9792         </class>
9793         
9794         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9795                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9796                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9797                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9798                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9799                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9800                 </fields>
9801                 <links>
9802                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9803                 </links>
9804         </class>
9805         
9806         <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">
9807                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9808                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9809                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9810                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9811                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9812                 </fields>
9813                 <links>
9814                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9815                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9816                 </links>
9817         </class>
9818
9819         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9820                 <fields oils_persist:primary="name">
9821                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9822                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9823                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9824                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9825                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9826                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9827                 </fields>
9828                 <links>
9829                 </links>
9830         </class>
9831
9832         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9833                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9834                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9835                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9836                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9837                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9838                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9839                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9840                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9841                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9842                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9843                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9844                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9845                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9846                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9847                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9848                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9849                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9850                 </fields>
9851                 <links>
9852                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9853                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9854                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9855                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9856                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9857                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9858                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9859                 </links>
9860         </class>
9861
9862         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9863                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9864                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9865                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9866                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9867                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9868                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9869                 </fields>
9870                 <links>
9871                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9872                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9873                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9874                 </links>
9875         </class>
9876
9877         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9878                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9879                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9880                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9881                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9882                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9883                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9884                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9885                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9886                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9887                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9888                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9889                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9890                 </fields>
9891                 <links>
9892                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9893                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9894                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9895                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9896                 </links>
9897         </class>
9898
9899         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9900                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9901                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9902                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9903                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9904                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9905                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9906                 </fields>
9907                 <links>
9908                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9909                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9910                 </links>
9911         </class>
9912
9913         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9914                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9915                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9916                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9917                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9918                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9919                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9920                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9921                 </fields>
9922                 <links>
9923                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9924                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9925                 </links>
9926         </class>
9927
9928         <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">
9929                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9930                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9931                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9932                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9933                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9934                 </fields>
9935                 <links>
9936                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9937                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9938                 </links>
9939         </class>
9940
9941         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9942                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9943                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9944                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9945                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9946                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9947                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9948                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9949                 </fields>
9950                 <links>
9951                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9952                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9953                 </links>
9954         </class>
9955
9956         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9957                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9958                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9959                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9960                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9961                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9962                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9963                 </fields>
9964                 <links>
9965                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9966                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9967                 </links>
9968         </class>
9969
9970         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9971                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9972                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9973                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9974                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9975                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9976                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9977                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9978                 </fields>
9979                 <links>
9980                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9981                 </links>
9982         </class>
9983
9984         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9985                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9986                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9987                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9988                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9989                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9990                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9991                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9992                 </fields>
9993                 <links>
9994                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9995                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9996                 </links>
9997         </class>
9998
9999         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10000                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10001                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10002                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10003                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10004                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10005                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10006                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10007                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10008                 </fields>
10009                 <links>
10010                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10011                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10012                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10013                 </links>
10014         </class>
10015
10016         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10017                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10018                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10019                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10020                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10021                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10022                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10023                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10024                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10025                 </fields>
10026                 <links>
10027                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10028                 </links>
10029         </class>
10030
10031         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10032                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10033                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10034                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10035                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10036                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10037                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10038                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10039                 </fields>
10040                 <links>
10041                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10042                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10043                 </links>
10044         </class>
10045
10046         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10047                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10048                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10049                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10050                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10051                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10052                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10053                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10054                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10055                 </fields>
10056                 <links>
10057                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10058                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10059                 </links>
10060         </class>
10061
10062         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10063                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10064                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10065                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10066                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10067                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10068                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10069                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10070                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10071                 </fields>
10072                 <links>
10073                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10074                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10075                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10076                 </links>
10077         </class>
10078
10079         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10080                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10081                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10082                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10083                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10084                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10085                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10086                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10087                 </fields>
10088                 <links>
10089                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10090                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10091                 </links>
10092         </class>
10093
10094         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10095                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10096                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10097                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10098                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10099                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10100                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10101                 </fields>
10102                 <links>
10103                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10104                 </links>
10105         </class>
10106
10107         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10108                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10109                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10110                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10111                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10112                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10113                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10114                 </fields>
10115                 <links>
10116                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10117                 </links>
10118         </class>
10119
10120         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10121                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10122                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10123                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10124                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10125                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10126                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10127                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10128                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10129                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10130                 </fields>
10131                 <links>
10132                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10133                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10134                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10135                 </links>
10136         </class>
10137
10138         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10139                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10140                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10141                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10142                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10143                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10144                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10145                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10146                 </fields>
10147                 <links>
10148                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10149                 </links>
10150         </class>
10151
10152         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10153                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10154                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10155                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10156                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10157                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10158                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10159                 </fields>
10160                 <links>
10161                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10162                 </links>
10163         </class>
10164
10165         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10166                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10167                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10168                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10169                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10170                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10171                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10172                 </fields>
10173                 <links>
10174                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10175                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10176                 </links>
10177         </class>
10178
10179         <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">
10180                 <fields oils_persist:primary="id">
10181                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10182                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10183                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10184                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10185                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10186                 </fields>
10187                 <links>
10188                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10189                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10190                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10191                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10192                 </links>
10193         </class>
10194
10195         <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">
10196                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10197                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10198                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10199                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10200                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10201                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10202                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10203                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10204                 </fields>
10205                 <links/>
10206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10207                         <actions>
10208                                 <retrieve/>
10209                         </actions>
10210                 </permacrud>
10211         </class>
10212
10213         <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">
10214                 <fields oils_persist:primary="ptype_key">
10215                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10216                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10217                 </fields>
10218                 <links/>
10219                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10220                         <actions>
10221                                 <retrieve/>
10222                         </actions>
10223                 </permacrud>
10224         </class>
10225
10226         <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">
10227                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10228                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10229                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10230                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10231                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10232                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10233                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10234                 </fields>
10235                 <links>
10236                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10237                 </links>
10238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10239                         <actions>
10240                                 <retrieve/>
10241                         </actions>
10242                 </permacrud>
10243         </class>
10244
10245         <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">
10246                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10247                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10248                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10249                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10250                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10251                 </fields>
10252                 <links>
10253                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10254                 </links>
10255                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10256                         <actions>
10257                                 <retrieve/>
10258                         </actions>
10259                 </permacrud>
10260         </class>
10261
10262     <class
10263         id="uvs"
10264         controller="open-ils.cstore open-ils.pcrud"
10265         oils_obj:fieldmapper="url_verify::session"
10266         oils_persist:tablename="url_verify.session"
10267         reporter:label="URL Verification Session"
10268     >
10269         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10270             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10271             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10272                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10273             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10274             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10275             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10276             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10277             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10278             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10279         </fields>
10280
10281         <links>
10282             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10283             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10284             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10285             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10286             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10287         </links>
10288
10289         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10290             <actions>
10291                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10292             </actions>
10293         </permacrud>
10294
10295     </class>
10296
10297     <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">
10298         <oils_persist:source_definition>
10299             SELECT
10300                 cbrebi.id AS id,  -- so we can have a pkey in our view
10301                 uvs.id AS session,
10302                 uvs.owning_lib,
10303                 cbrebi.target_biblio_record_entry
10304             FROM url_verify.session uvs
10305             JOIN container.biblio_record_entry_bucket cbreb
10306                 ON (uvs.container = cbreb.id)
10307             JOIN container.biblio_record_entry_bucket_item cbrebi
10308                 ON (cbrebi.bucket = cbreb.id)
10309         </oils_persist:source_definition>
10310         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10311             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10312             <field reporter:label="Session" name="session" reporter:datatype="link" />
10313             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10314             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10315         </fields>
10316         <links>
10317             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10318             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10319             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10320         </links>
10321         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10322             <actions>
10323                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10324             </actions>
10325         </permacrud>
10326     </class>
10327
10328     <class
10329         id="uvus"
10330         controller="open-ils.cstore open-ils.pcrud"
10331         oils_obj:fieldmapper="url_verify::url_selector"
10332         oils_persist:tablename="url_verify.url_selector"
10333         reporter:label="URL Verification URL Selector"
10334     >
10335         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10336             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10337             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10338                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10339             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10340         </fields>
10341
10342         <links>
10343             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10344             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10345         </links>
10346
10347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10348             <actions>
10349                 <create permission="URL_VERIFY">
10350                     <context link="session" field="owning_lib"/>
10351                 </create>
10352                 <retrieve permission="URL_VERIFY">
10353                     <context link="session" field="owning_lib"/>
10354                 </retrieve>
10355                 <update permission="URL_VERIFY">
10356                     <context link="session" field="owning_lib"/>
10357                 </update>
10358                 <delete permission="URL_VERIFY">
10359                     <context link="session" field="owning_lib"/>
10360                 </delete>
10361             </actions>
10362         </permacrud>
10363
10364     </class>
10365
10366     <class
10367         id="uvu"
10368         controller="open-ils.cstore open-ils.pcrud"
10369         oils_obj:fieldmapper="url_verify::url"
10370         oils_persist:tablename="url_verify.url"
10371         reporter:label="URL Verification URL"
10372     >
10373         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10374             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10375                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10376                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10377                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10378                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10379             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10380             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10381             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10382             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10383             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10384             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10385             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10386             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10387             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10388             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10389             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10390             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10391             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10392         </fields>
10393
10394         <links>
10395             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10396             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10397             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10398             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10399             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10400         </links>
10401
10402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10403             <actions>
10404                 <create permission="URL_VERIFY">
10405                     <context link="session" field="owning_lib"/>
10406                 </create>
10407                 <retrieve permission="URL_VERIFY">
10408                     <context link="session" field="owning_lib"/>
10409                 </retrieve>
10410                 <update permission="URL_VERIFY">
10411                     <context link="session" field="owning_lib"/>
10412                 </update>
10413                 <delete permission="URL_VERIFY">
10414                     <context link="session" field="owning_lib"/>
10415                 </delete>
10416             </actions>
10417         </permacrud>
10418
10419     </class>
10420
10421     <class
10422         id="uvva"
10423         controller="open-ils.cstore open-ils.pcrud"
10424         oils_obj:fieldmapper="url_verify::verification_attempt"
10425         oils_persist:tablename="url_verify.verification_attempt"
10426         reporter:label="URL Verification Attempt"
10427     >
10428         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10429             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10430                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10431                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10432             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10433             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10434         </fields>
10435
10436         <links>
10437             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10438             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10439         </links>
10440
10441         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10442             <actions>
10443                 <create permission="URL_VERIFY">
10444                     <context link="session" field="owning_lib"/>
10445                 </create>
10446                 <retrieve permission="URL_VERIFY">
10447                     <context link="session" field="owning_lib"/>
10448                 </retrieve>
10449                 <update permission="URL_VERIFY">
10450                     <context link="session" field="owning_lib"/>
10451                 </update>
10452                 <delete permission="URL_VERIFY">
10453                     <context link="session" field="owning_lib"/>
10454                 </delete>
10455             </actions>
10456         </permacrud>
10457
10458     </class>
10459
10460     <class
10461         id="uvuv"
10462         controller="open-ils.cstore open-ils.pcrud"
10463         oils_obj:fieldmapper="url_verify::url_verification"
10464         oils_persist:tablename="url_verify.url_verification"
10465         reporter:label="URL Verification"
10466     >
10467         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10468             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10469                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10470                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10471             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10472             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10473             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10474             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10475                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10476         </fields>
10477
10478         <links>
10479             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10480             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10481             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10482         </links>
10483
10484         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10485             <actions>
10486                 <create permission="URL_VERIFY">
10487                     <context link="attempt" jump="session" field="owning_lib"/>
10488                 </create>
10489                 <retrieve permission="URL_VERIFY">
10490                     <context link="attempt" jump="session" field="owning_lib"/>
10491                 </retrieve>
10492                 <update permission="URL_VERIFY">
10493                     <context link="attempt" jump="session" field="owning_lib"/>
10494                 </update>
10495                 <delete permission="URL_VERIFY">
10496                     <context link="attempt" jump="session" field="owning_lib"/>
10497                 </delete>
10498             </actions>
10499         </permacrud>
10500
10501     </class>
10502
10503         <class
10504                 id="cfdi"
10505                 controller="open-ils.cstore open-ils.pcrud"
10506                 oils_obj:fieldmapper="config::filter_dialog_interface"
10507                 oils_persist:tablename="config.filter_dialog_interface"
10508                 reporter:label="FilterDialog Interface">
10509                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10510                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10511                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10512                 </fields>
10513                 <links>
10514                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10515                 </links>
10516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10517                         <actions>
10518                                 <retrieve />
10519                         </actions>
10520                 </permacrud>
10521         </class>
10522
10523         <class
10524                 id="cfdfs"
10525                 controller="open-ils.cstore open-ils.pcrud"
10526                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10527                 oils_persist:tablename="config.filter_dialog_filter_set"
10528                 reporter:label="FilterDialog Filter Set">
10529                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10530                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10531                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10532                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10533                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10534                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10535                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10536                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10537                 </fields>
10538                 <links>
10539                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10540                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10541                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10542                 </links>
10543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10544                         <actions>
10545                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10546                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10547                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10548                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10549                         </actions>
10550                 </permacrud>
10551
10552         </class>
10553
10554         <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">
10555                 <fields oils_persist:primary="code">
10556                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10557                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10558                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10559                 </fields>
10560                 <links/>
10561                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10562                         <actions>
10563                                 <retrieve/>
10564                         </actions>
10565                 </permacrud>
10566         </class>
10567
10568         <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">
10569                 <oils_persist:source_definition>
10570
10571             SELECT  b.id,
10572                     MAX(dcp.edit_date) AS last_delete_date
10573              FROM   biblio.record_entry b
10574                     JOIN asset.call_number cn ON (cn.record = b.id)
10575                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10576              WHERE  NOT b.deleted
10577              GROUP BY b.id
10578              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10579
10580                 </oils_persist:source_definition>
10581                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10582                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10583                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10584                 </fields>
10585                 <links>
10586                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10587                 </links>
10588                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10589                         <actions>
10590                                 <retrieve/>
10591                         </actions>
10592                 </permacrud>
10593         </class>
10594
10595         <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">
10596                 <oils_persist:source_definition>
10597
10598             -- -- 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.
10599             -- -- 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
10600             -- -- may not.
10601             -- SELECT
10602             --     bre.id AS bib_id,
10603             --     COALESCE( z.copy_count, 0 ) AS copy_count,
10604             --     COALESCE( z.hold_count, 0 ) AS hold_count,
10605             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
10606             -- FROM (
10607                 SELECT
10608                     y.bre AS id,
10609                     COALESCE( x.copy_count, 0 ) AS copy_count,
10610                     y.hold_count AS hold_count,
10611                     (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
10612                 FROM (
10613                         SELECT
10614                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
10615                             COUNT(*) AS hold_count
10616                         FROM action.hold_request h
10617                         WHERE
10618                             cancel_time IS NULL
10619                             AND fulfillment_time IS NULL
10620                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10621                         GROUP BY 1
10622                     )y LEFT JOIN (
10623                         SELECT 
10624                             (SELECT id
10625                                 FROM biblio.record_entry 
10626                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10627                             ) AS bre, 
10628                             COUNT(*) AS copy_count
10629                         FROM asset.copy
10630                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10631                         WHERE copy.holdable 
10632                             AND NOT copy.deleted 
10633                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10634                         GROUP BY 1
10635                     )x ON x.bre = y.bre
10636                 -- )z RIGHT JOIN (
10637                 --     SELECT id
10638                 --     FROM biblio.record_entry
10639                 --     WHERE NOT deleted
10640                 -- )bre ON (z.bib_id = bre.id)
10641                 
10642
10643                 </oils_persist:source_definition>
10644                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10645                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10646                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10647                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10648                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10649                 </fields>
10650                 <links>
10651                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10652                 </links>
10653                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10654                         <actions>
10655                                 <retrieve/>
10656                         </actions>
10657                 </permacrud>
10658         </class>
10659
10660         <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">
10661                 <oils_persist:source_definition>
10662             SELECT *,
10663                 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,
10664                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10665             FROM
10666                 (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
10667                     FROM
10668                         action.hold_request ahr
10669                         JOIN reporter.hold_request_record rhrr USING (id)
10670                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10671                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10672                     WHERE
10673                         ahr.cancel_time IS NULL
10674                         AND ahr.fulfillment_time IS NULL
10675                     GROUP BY bib_record, pickup_lib
10676                 )x
10677                 JOIN
10678                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10679                     FROM
10680                         action.hold_request ahr
10681                         JOIN reporter.hold_request_record rhrr USING (id)
10682                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10683                     WHERE
10684                         ahr.cancel_time IS NULL
10685                         AND ahr.fulfillment_time IS NULL
10686                     GROUP BY bib_record
10687                 )y
10688                 USING (id)
10689                 </oils_persist:source_definition>
10690                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10691                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10692                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10693                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10694                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10695                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10696                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10697                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10698                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10699                 </fields>
10700                 <links>
10701                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10702                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10703                 </links>
10704                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10705                         <actions>
10706                                 <retrieve/>
10707                         </actions>
10708                 </permacrud>
10709         </class>
10710
10711         <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) ">
10712                 <oils_persist:source_definition>
10713             WITH counts_at_ou AS (
10714                 SELECT bib_record, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, 
10715                     COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
10716                 FROM action.hold_request ahr
10717                 JOIN reporter.hold_request_record rhrr USING (id)
10718                 LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10719                 LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10720                 WHERE ahr.cancel_time IS NULL
10721                 AND ahr.fulfillment_time IS NULL
10722                 GROUP BY bib_record, pickup_lib
10723             )
10724             SELECT *,
10725                 CASE WHEN copy_count_at_or_below = 0 THEN 'Infinity'::FLOAT ELSE holds_at_or_below::FLOAT/copy_count_at_or_below END AS hold_copy_ratio_at_or_below_ou,
10726                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10727             FROM
10728                 (SELECT bib_record AS id, aou.id AS pickup_lib_or_desc, SUM(holds_at_pickup_library) AS holds_at_or_below, SUM(copy_count_at_pickup_library) AS copy_count_at_or_below
10729                 FROM actor.org_unit aou
10730                 JOIN counts_at_ou cao ON (cao.pickup_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))) 
10731                 GROUP BY bib_record, pickup_lib_or_desc
10732                 )x
10733                 JOIN
10734                 (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10735                     FROM
10736                         action.hold_request ahr
10737                         JOIN reporter.hold_request_record rhrr USING (id)
10738                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10739                     WHERE
10740                         ahr.cancel_time IS NULL
10741                         AND ahr.fulfillment_time IS NULL
10742                     GROUP BY bib_record
10743                 )y
10744                 USING (id)
10745                 </oils_persist:source_definition>
10746                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10747                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10748                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
10749                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
10750                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
10751                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10752                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10753                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
10754                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10755                 </fields>
10756                 <links>
10757                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10758                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
10759                 </links>
10760                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10761                         <actions>
10762                                 <retrieve/>
10763                         </actions>
10764                 </permacrud>
10765         </class>
10766
10767         <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">
10768                 <oils_persist:source_definition>
10769             SELECT
10770                 ac.id,
10771                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10772                 MAX(actac.xact_start) AS last_circ
10773             FROM asset.copy ac
10774                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10775             GROUP BY ac.id
10776
10777             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10778             --SELECT
10779             --    ac.id,
10780             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10781             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10782             --FROM asset.copy ac
10783             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10784             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10785             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10786                 </oils_persist:source_definition>
10787                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10788                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10789                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10790                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10791                 </fields>
10792                 <links>
10793                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10794                 </links>
10795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10796                         <actions>
10797                                 <retrieve/>
10798                         </actions>
10799                 </permacrud>
10800         </class>
10801
10802         <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">
10803                 <fields oils_persist:primary="id">
10804                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10805                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10806                 </fields>
10807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10808                         <actions>
10809                                 <retrieve/>
10810                         </actions>
10811                 </permacrud>
10812         </class>
10813
10814         <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">
10815                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10816                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10817                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10818                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10819                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10820                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10821                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10822                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10823                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10824                 </fields>
10825                 <links>
10826                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10827                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10828                 </links>
10829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10830                         <actions>
10831                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10832                                 <retrieve/>
10833                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10834                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10835                         </actions>
10836                 </permacrud>
10837         </class>
10838
10839         <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">
10840                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10841                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10842                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10843                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10844                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10845                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10846                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10847                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10848                 </fields>
10849                 <links>
10850                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10851                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10852                 </links>
10853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10854                         <actions>
10855                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10856                                 <retrieve/>
10857                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10858                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10859                         </actions>
10860                 </permacrud>
10861         </class>
10862
10863
10864         <!-- ********************************************************************************************************************* -->
10865         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10866         <!-- ********************************************************************************************************************* -->
10867         <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">
10868                 <fields oils_persist:primary="id">
10869                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10870                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10871                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10872                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10873                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10874                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10875                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10876                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10877                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10878                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10879                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10880                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10881                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10882                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10883                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10884                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10885                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10886                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10887                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10888                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10889                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10890                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10891                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10892                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10893                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10894                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10895                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10896                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10897                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10898                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10899                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10900                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10901                 </fields>
10902                 <links>
10903                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10904                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10905                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10906                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10907                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10908                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10909                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10910                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10911                 </links>
10912         </class>
10913
10914         <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">
10915                 <fields oils_persist:primary="id">
10916                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10917                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10918                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10919                 </fields>
10920                 <links>
10921                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10922                 </links>
10923         </class>
10924
10925         <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">
10926                 <fields oils_persist:primary="id">
10927                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10928                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10929                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10930                 </fields>
10931                 <links>
10932                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10933                 </links>
10934         </class>
10935
10936         <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">
10937                 <fields oils_persist:primary="id">
10938                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10939
10940                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10941                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10942                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10943
10944                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10945                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10946                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10947
10948                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10949                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10950
10951                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10952                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10953                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10954
10955                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10956                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10957
10958                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10959                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10960                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10961
10962                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10963                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10964                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10965
10966                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10967                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10968                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10969                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10970
10971                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10972                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10973
10974                 </fields>
10975                 <links>
10976                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10977                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10978                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10979                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10980                 </links>
10981         </class>
10982
10983         <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">
10984                 <oils_persist:source_definition>
10985
10986             SELECT
10987                 po.ordering_agency AS ordering_agency,
10988                 po.id AS purchase_order,
10989                 li.id AS lineitem,
10990                 lid.id AS lineitem_detail,
10991                 cpa.id AS claim_policy_action
10992             FROM
10993                 acq.lineitem_detail lid
10994                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10995                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10996                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10997                 JOIN acq.claim_policy_action cpa ON (
10998                     cpa.claim_policy = cp.id
10999
11000                     -- we only care about claim policy actions whose claim
11001                     -- interval we'd reached or exceeded
11002                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11003
11004                     -- filter out all claim policy actions where claim events
11005                     -- have occurred on or after the action's action_interval
11006                     AND NOT EXISTS (
11007                         SELECT 1
11008                         FROM
11009                             acq.claim_event evt
11010                             JOIN acq.claim claim ON (
11011                                 claim.id = evt.claim
11012                                 AND claim.lineitem_detail = lid.id
11013                             )
11014                         WHERE
11015                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11016                     )
11017                 )
11018             WHERE
11019                 lid.cancel_reason IS NULL
11020                 AND li.cancel_reason IS NULL -- belt/suspenders
11021                 AND po.cancel_reason IS NULL -- belt/suspenders
11022                 AND lid.recv_time IS NULL
11023                 AND po.state = 'on-order'
11024             ORDER BY 1, 2, 3, 4, 5
11025
11026                 </oils_persist:source_definition>
11027                 <fields>
11028                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11029                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11030                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11031                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11032                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11033                 </fields>
11034                 <links>
11035                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11036                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11037                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11038                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11039                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11040                 </links>
11041         </class>
11042         <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">
11043                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11044                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11045                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11046                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11047                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11048                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11049                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11050                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11051                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11052                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11053                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11054                 </fields>
11055                 <links>
11056                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11057                 </links>
11058     </class>
11059         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11060                 <oils_persist:source_definition>
11061             SELECT * FROM acq.lineitem_summary 
11062                                 WHERE item_count > (invoice_count + cancel_count)
11063         </oils_persist:source_definition>
11064                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11065                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11066                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11067                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11068                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11069                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11070                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11071                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11072                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11073                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11074                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11075                 </fields>
11076                 <links>
11077                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11078                 </links>
11079     </class>
11080         <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">
11081                 <oils_persist:source_definition>
11082
11083                         SELECT  t.*
11084                           FROM  action.transit_copy t
11085                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11086                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11087                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11088
11089                 </oils_persist:source_definition>
11090                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11091                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11092                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11093                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11094                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11095                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11096                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11097                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11098                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11099                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11100                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11101                 </fields>
11102                 <links>
11103                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11104                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11105                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11106                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11107                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11108                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11109                 </links>
11110         </class>
11111
11112     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11113                 <oils_persist:source_definition>
11114
11115         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11116                 SELECT
11117                         cp.id as copy,
11118                         COUNT(circ.id),
11119                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11120                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11121                 FROM
11122                         asset.copy cp
11123                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11124                 GROUP BY 1, 3, 4
11125                 UNION ALL
11126                 SELECT
11127                         cp.id as copy,
11128                         COUNT(circ.id),
11129                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11130                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11131                 FROM
11132                         asset.copy cp
11133                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11134                 GROUP BY 1, 3, 4
11135                 UNION ALL
11136                 SELECT
11137                         id as copy,
11138                         circ_count,
11139                         -1 AS year,
11140                         false as is_renewal
11141                 FROM
11142                         extend_reporter.legacy_circ_count
11143         )x GROUP BY 1, 3, 4
11144
11145                 </oils_persist:source_definition>
11146         <fields>
11147             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11148             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11149             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11150             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11151         </fields>
11152                 <links>
11153                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11154                 </links>
11155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11156                         <actions>
11157                                 <retrieve/>
11158                         </actions>
11159                 </permacrud>
11160     </class>
11161
11162         <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">
11163                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11164                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11165                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11166                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11167                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11168                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11169                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11170                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11171                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11172                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11173                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11174                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11175                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11176                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11177                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11178                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11179                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11180                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11181                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11182                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11183                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11184                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11185                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11186                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11187                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11188                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11189                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11190                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11191                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11192                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11193                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11194                 </fields>
11195                 <links>
11196                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11197                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11198                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11199                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11200                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11201                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11202                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11203                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11204                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11205                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11206                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11207                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11208                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11209                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11210                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11211                 </links>
11212         </class>
11213
11214     <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">
11215         <fields oils_persist:primary="id">
11216             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11217             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11218             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11219             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11220             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11221             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11222             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11223             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11224             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11225             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11226             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11227             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11228             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11229             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11230             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11231             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11232             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11233             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11234             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11235             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11236             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11237             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11238             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11239             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11240             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11241             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11242             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11243             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11244             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11245             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11246             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11247             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11248             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11249             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11250         </fields>
11251         <links>
11252             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11253             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11254             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11255             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11256             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11257             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11258             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11259             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11260         </links>
11261     </class>
11262
11263     <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">
11264         <fields oils_persist:primary="id">
11265             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11266             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11267             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11268             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11269         </fields>
11270         <links>
11271             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11272             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11273         </links>
11274     </class>
11275
11276     <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">
11277         <fields oils_persist:primary="owning_lib">
11278             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11279             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11280             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11281         </fields>
11282         <links>
11283             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11284         </links>
11285     </class>
11286
11287     <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">
11288         <fields oils_persist:primary="id">
11289             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11290             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11291             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11292             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11293             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11294         </fields>
11295         <links>
11296             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11297             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11298             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11299         </links>
11300     </class>
11301
11302     <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">
11303         <fields oils_persist:primary="circ_lib">
11304             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11305             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11306             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11307             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11308         </fields>
11309         <links>
11310             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11311             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11312         </links>
11313     </class>
11314
11315     <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">
11316         <fields oils_persist:primary="id">
11317             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11318             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11319             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11320             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11321             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11322         </fields>
11323         <links>
11324             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11325             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11326             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11327         </links>
11328     </class>
11329
11330     <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">
11331         <fields oils_persist:primary="home_ou">
11332             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11333             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11334             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11335             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11336         </fields>
11337         <links>
11338             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11339             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11340         </links>
11341     </class>
11342         <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">
11343                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11344                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11345                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11346                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11347                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11348                 </fields>
11349                 <links>
11350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11351                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11352                 </links>
11353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11354                         <actions>
11355                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11356                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11357                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11358                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11359                         </actions>
11360                 </permacrud>
11361         </class>
11362         <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">
11363                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11364                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11365                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11366                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11367                 </fields>
11368                 <links>
11369                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11370                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11371                         </links>
11372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11373                 <actions>
11374                                 <create permission="ADMIN_ACQ_FUND_TAG">
11375                                         <context link="tag" field="owner"/>
11376                                 </create>
11377                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11378                                         <context link="tag" field="owner"/>
11379                                 </retrieve>
11380                                 <update permission="ADMIN_ACQ_FUND_TAG">
11381                                         <context link="tag" field="owner"/>
11382                                 </update>
11383                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11384                                         <context link="tag" field="owner"/>
11385                                 </delete>
11386                         </actions>
11387                 </permacrud>
11388         </class>
11389         <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">
11390                 <oils_persist:source_definition><![CDATA[
11391                 SELECT
11392                         poi.purchase_order AS purchase_order,
11393                         ii.invoice AS invoice,
11394                         NULL AS lineitem,
11395                         poi.id AS po_item,
11396                         NULL AS picklist
11397                 FROM
11398                         acq.po_item poi
11399                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11400                 UNION SELECT
11401                         jub.purchase_order AS purchase_order,
11402                         ie.invoice AS invoice,
11403                         jub.id AS lineitem,
11404                         NULL AS po_item,
11405                         jub.picklist AS picklist
11406                 FROM
11407                         acq.lineitem jub
11408                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11409                 UNION SELECT
11410                         ii.purchase_order AS purchase_order,
11411                         ii.invoice AS invoice,
11412                         NULL AS lineitem,
11413                         NULL AS po_item,
11414                         NULL AS picklist
11415                 FROM
11416                         acq.invoice_item ii
11417                 WHERE ii.po_item IS NULL
11418                 UNION SELECT
11419                         ie.purchase_order AS purchase_order,
11420                         ie.invoice AS invoice,
11421                         NULL AS lineitem,
11422                         NULL AS po_item,
11423                         NULL AS picklist
11424                 FROM
11425                         acq.invoice_entry ie
11426                 WHERE ie.lineitem IS NULL
11427                 UNION SELECT
11428                         NULL AS purchase_order,
11429                         NULL AS invoice,
11430                         jub.id AS lineitem,
11431                         NULL AS po_item,
11432                         jub.picklist AS picklist
11433                 FROM
11434                         acq.lineitem jub
11435                 WHERE jub.purchase_order IS NULL
11436                 ]]></oils_persist:source_definition>
11437                 <fields>
11438                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11439                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11440                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11441                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11442                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11443                 </fields>
11444                 <links>
11445                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11446                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11447                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11448                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11449                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11450                 </links>
11451         </class>
11452         <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">
11453                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11454                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11455                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11456                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11457                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11458                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11459                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11460                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11461                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11462                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11463                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11464                 </fields>
11465                 <links>
11466                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11467                 </links>
11468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11469                         <actions>
11470                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11471                                 <retrieve/>
11472                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11473                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11474                         </actions>
11475                 </permacrud>
11476         </class>
11477
11478         <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">
11479                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11480                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11481                         <field name="date_applied" reporter:datatype="timestamp"/>
11482                         <field name="org" reporter:datatype="org_unit"/>
11483                         <field name="original_value" reporter:datatype="text"/>
11484                         <field name="new_value" reporter:datatype="text"/>
11485                         <field name="field_name" reporter:datatype="link"/>
11486                 </fields>
11487                 <links>
11488                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11489                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11490                 </links>
11491                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11492                         <actions>
11493                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11494                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11495                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11496                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11497                         </actions>
11498                 </permacrud>
11499         </class>
11500         <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">
11501                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11502                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11503                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11504                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11505                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11506                 </fields>
11507                 <links>
11508                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11509                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11510                 </links>
11511         </class>
11512         <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">
11513                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11514                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11515                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11516                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11517                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11518                 </fields>
11519                 <links>
11520                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11521                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11522                 </links>
11523         </class>
11524         <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">
11525                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11526                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11527                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11528                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11529                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11530                 </fields>
11531                 <links>
11532                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11533                 </links>
11534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11535                         <actions>
11536                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11537                                 <retrieve/>
11538                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11539                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11540                         </actions>
11541                 </permacrud>
11542         </class>
11543         <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">
11544                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11545                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11546                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11547                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11548                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11549                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11550                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11551                 </fields>
11552                 <links>
11553                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11554                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11555                 </links>
11556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11557                         <actions>
11558                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11559                                 <retrieve/>
11560                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11561                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11562                         </actions>
11563                 </permacrud>
11564         </class>
11565         <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">
11566         <oils_persist:source_definition>
11567         SELECT ahcm.target_copy AS id,count(*) AS count
11568          FROM
11569          action.hold_request ahr,
11570          action.hold_copy_map ahcm
11571          WHERE
11572          ahr.cancel_time IS NULL AND
11573          ahr.fulfillment_time IS NULL AND
11574          ahr.capture_time IS NULL AND
11575          ahr.id = ahcm.hold
11576          GROUP BY ahcm.target_copy
11577         </oils_persist:source_definition>
11578         <fields oils_persist:primary="id">
11579             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11580             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11581         </fields>
11582         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11583             <actions>
11584                <retrieve/>
11585             </actions>
11586         </permacrud>
11587         </class>
11588
11589         <!-- ********************************************************************************************************************* -->
11590
11591 </IDL>
11592
11593 <!--
11594     vim:noet:ts=4:sw=4:
11595 -->