]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1682292: Mark record attr label and description as translation-aware
[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" oils_persist:i18n="true"/>
957                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
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 open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
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                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2327                         <actions>
2328                                 <retrieve/>
2329                         </actions>
2330                 </permacrud>
2331         </class>
2332         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2333                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2334                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2335                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2336                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2337                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2338                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2339                 </fields>
2340                 <links>
2341                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2342                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2343                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2344                 </links>
2345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2346                         <actions>
2347                                 <retrieve/>
2348                         </actions>
2349                 </permacrud>
2350         </class>
2351         <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">
2352                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2353                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2354                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2355                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2356                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2357                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2358                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2359                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2360                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2361                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2362                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2363                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2364                 </fields>
2365                 <links>
2366                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2367                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2368                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2369                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2370                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2371                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2372                 </links>
2373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2374             <actions>
2375                 <create permission="TRANSIT_COPY" context_field="owner">
2376                     <context link="target_copy" field="circ_lib"/>
2377                 </create>
2378                 <retrieve/>
2379                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2380                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2381             </actions>
2382         </permacrud>
2383         </class>
2384         <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">
2385                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2386                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2387                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2388                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2389                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2390                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2391                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2392                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2393                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2394                 </fields>
2395                 <links>
2396                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2397                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2398                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2399                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2400                 </links>
2401         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2402             <actions>
2403                 <create permission="ADMIN_SURVEY">
2404                     <context link="survey" field="owner"/>
2405                 </create>
2406                 <retrieve permission="VIEW_USER">
2407                     <context link="usr" field="home_ou"/>
2408                 </retrieve>
2409                 <update permission="ADMIN_SURVEY">
2410                     <context link="survey" field="owner"/>
2411                 </update>
2412                 <delete permission="ADMIN_SURVEY">
2413                     <context link="survey" field="owner"/>
2414                 </delete>
2415             </actions>
2416         </permacrud>
2417         </class>
2418         <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">
2419                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2420                         <field name="bucket" />
2421                         <field name="id" reporter:datatype="id" />
2422                         <field name="target_copy" reporter:datatype="link"/>
2423                         <field name="create_time" reporter:datatype="timestamp" />
2424                         <field name="pos" reporter:datatype="int" />
2425                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2426                 </fields>
2427                 <links>
2428                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2429                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2430             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2431                 </links>
2432         </class>
2433         <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">
2434                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2435                         <field name="id" reporter:datatype="id" />
2436                         <field name="item" reporter:datatype="link"/>
2437                         <field name="note" reporter:datatype="text" />
2438                 </fields>
2439                 <links>
2440                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2441                 </links>
2442         </class>
2443
2444         <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">
2445                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2446                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2447                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2448                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2449                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2450                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2451                 </fields>
2452                 <links>
2453                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2454                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2455                 </links>
2456                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2457                         <actions>
2458                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2459                                 <retrieve/>
2460                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2461                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2462                         </actions>
2463                 </permacrud>
2464         </class>
2465
2466         <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">
2467                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2468                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2469                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2470                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2471                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2472                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2473                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2474                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2475                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2476                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2477                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2478                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2479                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2480                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2481                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2482                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2483                 </fields>
2484                 <links>
2485                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2486                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2487                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2488                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2489                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2490                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2491                 </links>
2492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2493                         <actions>
2494                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2495                                 <retrieve/>
2496                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2497                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2498                         </actions>
2499                 </permacrud>
2500         </class>
2501
2502         <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">
2503                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2504                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2505                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2506                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2507                 </fields>
2508                 <links>
2509                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2510                 </links>
2511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2512                         <actions>
2513                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2514                                 <retrieve/>
2515                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2516                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2517                         </actions>
2518                 </permacrud>
2519         </class>
2520
2521         <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">
2522                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2523                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2524                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2525                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2526                 </fields>
2527                 <links>
2528                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2529                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2530                 </links>
2531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2532                         <actions>
2533                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2534                                 <retrieve/>
2535                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2536                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2537                         </actions>
2538                 </permacrud>
2539         </class>
2540
2541         <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">
2542                 <fields oils_persist:primary="code">
2543                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2544                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2545                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2546                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2547                 </fields>
2548                 <links>
2549                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2550                 </links>
2551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2552                         <actions>
2553                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2554                                 <retrieve/>
2555                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2556                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2557                         </actions>
2558                 </permacrud>
2559         </class>
2560
2561         <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">
2562                 <fields oils_persist:primary="code">
2563                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2564                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2565                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2566                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2567                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2568                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2569                 </fields>
2570                 <links>
2571                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2572                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2573                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2574                 </links>
2575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2576                         <actions>
2577                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2578                                 <retrieve/>
2579                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2580                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2581                         </actions>
2582                 </permacrud>
2583         </class>
2584
2585     <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">
2586         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2587             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2588             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2589             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2590         </fields>
2591         <links>
2592             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2593             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2594         </links>
2595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2596             <actions>
2597                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2598                 <retrieve/>
2599                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2600                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2601             </actions>
2602         </permacrud>
2603     </class>
2604
2605         <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">
2606                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2607                         <field name="active" reporter:datatype="bool"/>
2608                         <field name="create_date" reporter:datatype="timestamp"/>
2609                         <field name="creator" />
2610                         <field name="deleted" reporter:datatype="bool"/>
2611                         <field name="edit_date" reporter:datatype="timestamp"/>
2612                         <field name="editor" />
2613                         <field name="id" reporter:datatype="id" />
2614                         <field name="last_xact_id" />
2615                         <field name="marc" />
2616                         <field name="source" />
2617                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2618                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2619                         <field name="heading" />
2620                         <field name="simple_heading" />
2621                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2622                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2623                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2624                 </fields>
2625                 <links>
2626                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2627                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2628                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2629                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2630                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2631                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2632                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2633                 </links>
2634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2635                         <actions>
2636                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2637                                 <retrieve/>
2638                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2639                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2640                         </actions>
2641                 </permacrud>
2642         </class>
2643         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2644                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2645                         <field name="char_encoding" />
2646                         <field name="id" />
2647                         <field name="record" />
2648                         <field name="record_status" />
2649                         <field name="thesaurus" />
2650                 </fields>
2651                 <links>
2652                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2653                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2654                 </links>
2655         </class>
2656         <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">
2657                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2658                         <field name="id" reporter:datatype="id" />
2659                         <field name="bib" reporter:datatype="link" />
2660                         <field name="authority" reporter:datatype="link" />
2661                 </fields>
2662                 <links>
2663                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2664                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2665                 </links>
2666         </class>
2667         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2668                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2669                         <field name="id" reporter:datatype="id" />
2670                         <field name="record" reporter:datatype="link" />
2671                         <field name="atag" reporter:datatype="link" />
2672                         <field name="value" reporter:datatype="text" />
2673                 </fields>
2674                 <links>
2675                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2676                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2677                 </links>
2678         </class>
2679         <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">
2680                 <fields oils_persist:primary="code" oils_persist:sequence="">
2681                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2682                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2683                 </fields>
2684                 <links/>
2685         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2686             <actions>
2687                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2688                 <retrieve/>
2689                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2690                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2691             </actions>
2692         </permacrud>
2693         </class>
2694         <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">
2695                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2696                         <field name="accepting_usr" />
2697                         <field name="amount" reporter:datatype="money" />
2698                         <field name="amount_collected" reporter:datatype="money" />
2699                         <field name="approval_code" reporter:datatype="text"/>
2700                         <field name="cash_drawer" reporter:datatype="link"/>
2701                         <field name="cc_number" reporter:datatype="text"/>
2702                         <field name="cc_order_number" reporter:datatype="text"/>
2703                         <field name="cc_processor" reporter:datatype="text"/>
2704                         <field name="id" reporter:datatype="id" />
2705                         <field name="note" reporter:datatype="text"/>
2706                         <field name="payment_ts" reporter:datatype="timestamp"/>
2707                         <field name="xact" reporter:datatype="link"/>
2708                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2709                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2710                 </fields>
2711                 <links>
2712                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2713                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2714                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2715                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2716                 </links>
2717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2718             <actions>
2719                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2720                     <context link="xact" jump="usr" field="home_ou"/>
2721                 </retrieve>
2722                         </actions>
2723                 </permacrud>
2724         </class>
2725         <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">
2726                 <fields oils_persist:primary="name">
2727                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2728                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2729                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2730                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2731                 </fields>
2732                 <links/>
2733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2734             <actions>
2735                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2736                 <retrieve/>
2737                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2738                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2739             </actions>
2740         </permacrud>
2741         </class>
2742
2743         <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">
2744                 <fields oils_persist:primary="alias">
2745                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2746                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2747                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2748                 </fields>
2749                 <links>
2750                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2751                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2752                 </links>
2753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2754             <actions>
2755                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2756                 <retrieve/>
2757                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2758                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2759             </actions>
2760         </permacrud>
2761         </class>
2762
2763         <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">
2764                 <fields oils_persist:primary="name">
2765                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2766                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2767                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2768                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2769                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2770                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2771                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2772                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2773                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2774                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2775                 </fields>
2776                 <links>
2777                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2778                 </links>
2779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2780             <actions>
2781                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2782                 <retrieve/>
2783                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2784                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2785             </actions>
2786         </permacrud>
2787         </class>
2788
2789         <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">
2790                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2791                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2792                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2793                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2794                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2795                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2796                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2797                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2798                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2799                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2800                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2801                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2802                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2803                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2804                 </fields>
2805                 <links>
2806                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2807                 </links>
2808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2809             <actions>
2810                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2811                 <retrieve/>
2812                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2813                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2814             </actions>
2815         </permacrud>
2816         </class>
2817         <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">
2818                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2819                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2820                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2821                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2822                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2823                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2824                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2825                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2826                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2827                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2828                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2829                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2830                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2831                 </fields>
2832                 <links>
2833                 </links>
2834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2835                         <actions>
2836                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2837                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2838                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2839                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2840                         </actions>
2841                 </permacrud>
2842         </class>
2843         <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">
2844                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2845                         <field name="id" reporter:datatype="id" />
2846                         <field name="name" reporter:datatype="text"/>
2847                         <field name="xpath" reporter:datatype="text"/>
2848                         <field name="format" reporter:datatype="link"/>
2849                         <field name="first_word" reporter:datatype="bool" />
2850                 </fields>
2851                 <links/>
2852         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2853             <actions>
2854                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2855                 <retrieve/>
2856                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2857                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2858             </actions>
2859         </permacrud>
2860         </class>
2861         <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">
2862                 <fields oils_persist:primary="code" oils_persist:sequence="">
2863                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2864                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2865                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2866                 </fields>
2867                 <links/>
2868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2869             <actions>
2870                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2871                 <retrieve/>
2872                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2873                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2874             </actions>
2875         </permacrud>
2876         </class>
2877         <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">
2878                 <fields oils_persist:primary="code" oils_persist:sequence="">
2879                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2880                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2881                 </fields>
2882                 <links/>
2883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2884             <actions>
2885                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2886                 <retrieve/>
2887                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2888                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2889             </actions>
2890         </permacrud>
2891         </class>
2892     <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">
2893         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2894             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2895             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2896             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2897             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2898         </fields>
2899         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2900             <actions>
2901                 <retrieve/>
2902             </actions>
2903         </permacrud>
2904     </class>
2905         <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">
2906                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2907                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2908                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2909                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2910                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2911                 </fields>
2912                 <links>
2913                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2914                 </links>
2915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2916             <actions>
2917                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2918                 <retrieve/>
2919                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2920                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2921             </actions>
2922         </permacrud>
2923         </class>
2924         <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">
2925                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2926                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2927                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2928                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2929                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2930                 </fields>
2931                 <links>
2932                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2933                 </links>
2934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2935             <actions>
2936                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2937                 <retrieve/>
2938                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2939                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2940             </actions>
2941         </permacrud>
2942         </class>
2943         <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">
2944                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2945                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2946                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2947                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2948                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2949                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2950                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2951                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2952                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2953                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2954                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2955                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2956                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2957                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2958                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2959                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2960                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2961                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2962                 </fields>
2963                 <links>
2964                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2965                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2966                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2967                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2968                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2969                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2970                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2971                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2972                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2973                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2974                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2975                 </links>
2976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2977             <actions>
2978                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2979                 <retrieve/>
2980                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2981                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2982             </actions>
2983         </permacrud>
2984         </class>
2985         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2986                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2987                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2988                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2989                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2990                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2991                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2992                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2993                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2994                 </fields>
2995                 <links>
2996                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2997                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2998         </links>
2999         </class>
3000         <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">
3001                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3002                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3003                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3004                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3005                 </fields>
3006                 <links>
3007                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3008                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3009                 </links>
3010         </class>
3011         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3012                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3013                         <field name="id" reporter:datatype="id" />
3014                         <field name="value" oils_persist:i18n="true" />
3015                 </fields>
3016                 <links/>
3017         </class>
3018         <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">
3019                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3020                         <field name="balance_owed" reporter:datatype="money" />
3021                         <field name="total_owed" reporter:datatype="money" />
3022                         <field name="total_paid" reporter:datatype="money" />
3023                         <field name="usr" reporter:datatype="link"/>
3024                 </fields>
3025                 <links>
3026                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3027         </links>
3028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3029             <actions>
3030                 <retrieve permission="VIEW_USER">
3031                     <context link="usr" field="home_ou"/>
3032                 </retrieve>
3033             </actions>
3034         </permacrud>
3035         </class>
3036         <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">
3037                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3038                         <field name="collector" />
3039                         <field name="enter_time" reporter:datatype="timestamp"/>
3040                         <field name="id" reporter:datatype="id" />
3041                         <field name="location" reporter:datatype="link"/>
3042                         <field name="usr" reporter:datatype="link"/>
3043                 </fields>
3044                 <links>
3045                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3046                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3047                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3048                 </links>
3049         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3050             <actions>
3051                 <create permission="money.collections_tracker.create" context_field="location"/>
3052                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3053                 <delete permission="money.collections_tracker.create" context_field="location"/>
3054             </actions>
3055         </permacrud>
3056         </class>
3057         <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">
3058                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3059                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3060                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3061                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3062                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3063                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3064                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3065                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3066                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3067                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3068                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3069                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3070                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3071                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3072                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3073                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3074                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3075                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3076                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3077                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3078                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3079                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3080                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3081                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3082                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3083                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3084                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3085                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3086                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3087                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3088                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3089                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3090                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3091                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3092                 </fields>
3093                 <links>
3094                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3095                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3096                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3097                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3098                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3099                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3100                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3101                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3102                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3103                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3104                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3105                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3106                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3107                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3108                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3109                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3110                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3111                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3112                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3113                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3114                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3115                 </links>
3116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3117             <actions>
3118                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3119                 <retrieve/>
3120                 <update permission="UPDATE_MARC" global_required="true"/>
3121                 <!-- 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. -->
3122                 <delete permission="DELETE_RECORD" global_required="true"/>
3123             </actions>
3124         </permacrud>
3125         </class>
3126         <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">
3127                 <fields oils_persist:primary="id">
3128                         <field name="dow_0_close" />
3129                         <field name="dow_0_open" />
3130                         <field name="dow_1_close" />
3131                         <field name="dow_1_open" />
3132                         <field name="dow_2_close" />
3133                         <field name="dow_2_open" />
3134                         <field name="dow_3_close" />
3135                         <field name="dow_3_open" />
3136                         <field name="dow_4_close" />
3137                         <field name="dow_4_open" />
3138                         <field name="dow_5_close" />
3139                         <field name="dow_5_open" />
3140                         <field name="dow_6_close" />
3141                         <field name="dow_6_open" />
3142                         <field name="id" reporter:datatype="id" />
3143                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3144                 </fields>
3145                 <links>
3146                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3147                 </links>
3148         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3149             <actions>
3150                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3151                 <retrieve/>
3152                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3153                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3154             </actions>
3155         </permacrud>
3156         </class>
3157         <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">
3158                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3159                         <field name="id" reporter:datatype="id" />
3160                         <field name="record" reporter:datatype="link"/>
3161                         <field name="label" reporter:datatype="text"/>
3162                         <field name="label_sortkey" reporter:datatype="text"/>
3163                         <field name="deleted" reporter:datatype="bool"/>
3164                 </fields>
3165                 <links>
3166                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3167                 </links>
3168         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3169             <actions>
3170                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3171                 <retrieve/>
3172                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3173                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3174             </actions>
3175         </permacrud>
3176         </class>
3177         <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">
3178                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3179                         <field name="id" reporter:datatype="id" />
3180                         <field name="target_copy" reporter:datatype="link" />
3181                         <field name="part" reporter:datatype="link"/>
3182                 </fields>
3183                 <links>
3184                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3185                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3186                 </links>
3187         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3188             <actions>
3189                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3190                 <retrieve/>
3191                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3192                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3193             </actions>
3194         </permacrud>
3195         </class>
3196         <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">
3197                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3198                         <field name="close_end" reporter:datatype="timestamp" />
3199                         <field name="close_start" reporter:datatype="timestamp" />
3200                         <field name="id" reporter:datatype="id" />
3201                         <field name="org_unit" reporter:datatype="org_unit"/>
3202                         <field name="reason" reporter:datatype="text"/>
3203                 </fields>
3204                 <links>
3205                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3206                 </links>
3207         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3208             <actions>
3209                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3210                 <retrieve/>
3211                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3212                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3213             </actions>
3214         </permacrud>
3215         </class>
3216         <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">
3217                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3218                         <field name="extended" reporter:datatype="interval"/>
3219                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3220                         <field name="max_renewals" reporter:datatype="int" />
3221                         <field name="name" reporter:datatype="text"/>
3222                         <field name="normal" reporter:datatype="interval"/>
3223                         <field name="shrt" reporter:datatype="interval"/>
3224                 </fields>
3225                 <links>
3226                 </links>
3227         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3228             <actions>
3229                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3230                 <retrieve/>
3231                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3232                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3233             </actions>
3234         </permacrud>
3235         </class>
3236
3237         <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">
3238                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3239                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3240                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3241             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3242                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3243             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3244                 </fields>
3245                 <links>
3246             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3247                 </links>
3248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3249             <actions>
3250                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3251                 <retrieve/>
3252                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3253                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3254             </actions>
3255                 </permacrud>
3256         </class>
3257
3258         <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">
3259                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3260                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3261                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3262                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3263             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3264                 </fields>
3265                 <links>
3266                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3267                 </links>
3268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3269             <actions>
3270                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3271                 <retrieve/>
3272                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3273                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3274             </actions>
3275                 </permacrud>
3276         </class>
3277
3278         <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">
3279                 <fields oils_persist:primary="id" oils_persist:sequence="">
3280                         <field name="balance_owed" reporter:datatype="money"/>
3281                         <field name="id" reporter:datatype="id" />
3282                         <field name="last_billing_note" reporter:datatype="text"/>
3283                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3284                         <field name="last_billing_type" reporter:datatype="text"/>
3285                         <field name="last_payment_note" reporter:datatype="text"/>
3286                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3287                         <field name="last_payment_type" reporter:datatype="text"/>
3288                         <field name="total_owed" reporter:datatype="money"/>
3289                         <field name="total_paid" reporter:datatype="money"/>
3290                         <field name="usr" reporter:datatype="link"/>
3291                         <field name="xact_finish" reporter:datatype="timestamp" />
3292                         <field name="xact_start" reporter:datatype="timestamp" />
3293                         <field name="xact_type" reporter:datatype="text"/>
3294                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3295                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3296                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3297                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3298                         <field name="billing_location" reporter:datatype="link"/>
3299                 </fields>
3300                 <links>
3301                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3302                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3303                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3304                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3305                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3306                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3307                 </links>
3308                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3309                         <actions>
3310                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3311                                         <context link="usr" field="home_ou" />
3312                                 </retrieve>
3313                         </actions>
3314                 </permacrud>
3315         </class>
3316         <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">
3317                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3318                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3319                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3320                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3321                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3322                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3323                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3324                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3325                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3326                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3327                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3328                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3329                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3330                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3331                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3332                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3333                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3334                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3335                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3336                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3337                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3338                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3339                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3340                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3341                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3342                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3343                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3344                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3345                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3346                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3347                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3348                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3349                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3350                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3351                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3352                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3353                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3354                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3355                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3356                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3357                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3358                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3359                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3360                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3361                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3362                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3363                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3364                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3365                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3366                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3367                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3368                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3369                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3370                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3371                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3372                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3373                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3374                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3375                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3376                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3377                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3378                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3379                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3380                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3381                 </fields>
3382                 <links>
3383                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3384                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3385                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3386                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3387                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3388                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3389                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3390                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3391                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3392                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3393                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3394                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3395                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3396                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3397                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3398                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3399                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3400                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3401                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3402                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3403                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3404                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3405                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3406                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3407                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3408                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3409                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3410                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3411                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3412                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3413                 </links>
3414                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3415                         <actions>
3416                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3417                         </actions>
3418                 </permacrud>
3419         </class>
3420         <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">
3421                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3422                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3423                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3424                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3425                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3426                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3427                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3428                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3429                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3430         </fields>
3431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3432                         <actions>
3433                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3434                                 <retrieve/>
3435                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3436                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3437                         </actions>
3438                 </permacrud>
3439         </class>
3440         <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">
3441                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3442                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3443                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3444                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3445                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3446         </fields>
3447         <links>
3448                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3449                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3450                 </links>
3451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3452                         <actions>
3453                                 <retrieve permission="RUN_REPORTS">
3454                                         <context link="usr" field="home_ou" />
3455                                 </retrieve>
3456                         </actions>
3457                 </permacrud>
3458         </class>
3459         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3460                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3461                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3462                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3463                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3464                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3465                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3466                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3467         </fields>
3468         <links>
3469                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3470                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3471                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3472                 </links>
3473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3474                         <actions>
3475                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3476                                         <context link="usr" field="home_ou" />
3477                                         <context link="ws" field="owning_lib" />
3478                                 </retrieve>
3479                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3480                                         <context link="usr" field="home_ou" />
3481                                         <context link="ws" field="owning_lib" />
3482                                 </create>
3483                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3484                                         <context link="usr" field="home_ou" />
3485                                         <context link="ws" field="owning_lib" />
3486                                 </update>
3487                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3488                                         <context link="usr" field="home_ou" />
3489                                         <context link="ws" field="owning_lib" />
3490                                 </delete>
3491                         </actions>
3492                 </permacrud>
3493         </class>
3494         <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">
3495                 <fields oils_persist:primary="name">
3496                         <field name="name" reporter:datatype="text"/>
3497                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3498                 </fields>
3499                 <links/>
3500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3501                         <actions>
3502                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3503                                 <retrieve/>
3504                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3505                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3506                         </actions>
3507                 </permacrud>
3508         </class>
3509         <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">
3510                 <fields oils_persist:primary="name">
3511                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3512                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3513                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3514                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3515                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3516                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3517                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3518                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3519                 </fields>
3520                 <links>
3521                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3522                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3523                 </links>
3524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3525                         <actions>
3526                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3527                                 <retrieve/>
3528                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3529                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3530                         </actions>
3531                 </permacrud>
3532         </class>
3533         <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">
3534                 <fields oils_persist:primary="name">
3535                         <field name="name" reporter:datatype="text"/>
3536                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3537                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3538                         <field name="datatype" reporter:datatype="text"/>
3539                         <field name="view_perm" reporter:datatype="link"/>
3540                         <field name="update_perm" reporter:datatype="link"/>
3541                         <field name="fm_class" reporter:datatype="text"/>
3542                         <field name="grp" reporter:datatype="link"/>
3543                 </fields>
3544                 <links>
3545                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3546                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3547                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3548                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3549                 </links>
3550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3551                         <actions>
3552                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3553                                 <retrieve/>
3554                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3555                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3556                         </actions>
3557                 </permacrud>
3558         </class>
3559         <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">
3560                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3561                         <field name="id" />
3562                         <field name="name"  reporter:datatype="text"/>
3563                         <field name="org_unit" reporter:datatype="org_unit"/>
3564                         <field name="value"  reporter:datatype="text"/>
3565                 </fields>
3566                 <links>
3567                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3568                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3569                 </links>
3570         </class>
3571         <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">
3572                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3573                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3574                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3575                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3576                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3577                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3578                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3579                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3580                 </fields>
3581                 <links>
3582                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3583                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3584                 </links>
3585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3586             <actions>
3587                 <create permission="CREATE_COPY_NOTE">
3588                     <context link="owning_copy" field="circ_lib"/>
3589                 </create>
3590                 <retrieve permission="VIEW_COPY_NOTES">
3591                     <context link="owning_copy" field="circ_lib"/>
3592                 </retrieve>
3593                 <update permission="UPDATE_COPY_NOTE">
3594                     <context link="owning_copy" field="circ_lib"/>
3595                 </update>
3596                 <delete permission="DELETE_COPY_NOTE">
3597                     <context link="owning_copy" field="circ_lib"/>
3598                 </delete>
3599             </actions>
3600         </permacrud>
3601         </class>
3602         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3603                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3604                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3605                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3606                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3607                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3608                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3609                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3610                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3611                 </fields>
3612                 <links>
3613                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3614                 </links>
3615         </class>
3616         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3617                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3618                         <field name="fingerprint"  reporter:datatype="text"/>
3619                         <field name="id" reporter:datatype="id" />
3620                         <field name="master_record" reporter:datatype="link"/>
3621                         <field name="mods"  reporter:datatype="text"/>
3622                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3623                 </fields>
3624                 <links>
3625                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3626                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3627                 </links>
3628         </class>
3629         <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">
3630                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3631                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3632                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3633                 </fields>
3634                 <links/>
3635         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3636             <actions>
3637                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3638                 <retrieve/>
3639                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3640                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3641             </actions>
3642         </permacrud>
3643         </class>
3644         <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">
3645                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3646                         <field name="code"  reporter:datatype="text"/>
3647                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3648                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3649                 </fields>
3650                 <links/>
3651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3652             <actions>
3653                 <create permission="CREATE_PERM" global_required="true"/>
3654                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3655                 <update permission="UPDATE_PERM" global_required="true"/>
3656                 <delete permission="DELETE_PERM" global_required="true"/>
3657             </actions>
3658         </permacrud>
3659         </class>
3660         <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">
3661                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3662                         <field name="id" reporter:datatype="id" />
3663                         <field name="metarecord" reporter:datatype="link"/>
3664                         <field name="source" reporter:datatype="link"/>
3665                 </fields>
3666                 <links>
3667                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3668                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3669                 </links>
3670         </class>
3671         <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">
3672                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3673                         <field name="id" reporter:datatype="id" />
3674                         <field name="field" reporter:datatype="link"/>
3675                         <field name="source" reporter:datatype="link"/>
3676                         <field name="value"  reporter:datatype="text"/>
3677                 </fields>
3678                 <links>
3679                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3680                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3681                 </links>
3682         </class>
3683         <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">
3684                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3685                         <field name="id" reporter:datatype="id" />
3686                         <field name="value" reporter:datatype="text"/>
3687                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3688                 </fields>
3689                 <links>
3690                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3691                 </links>
3692         </class>
3693         <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">
3694                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3695                         <field name="id" reporter:datatype="id" />
3696                         <field name="entry" reporter:datatype="link"/>
3697                         <field name="def" reporter:datatype="link"/>
3698                         <field name="source" reporter:datatype="link"/>
3699                 </fields>
3700                 <links>
3701                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3702                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3703                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3704                 </links>
3705         </class>
3706         <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">
3707                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3708                         <field name="id" reporter:datatype="id" />
3709                         <field name="entry" reporter:datatype="link"/>
3710                         <field name="simple_heading" reporter:datatype="link"/>
3711                 </fields>
3712                 <links>
3713                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3714                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3715                 </links>
3716         </class>
3717         <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">
3718                 <oils_persist:source_definition>
3719                         SELECT * FROM metabib.author_field_entry
3720                                                 UNION ALL
3721                         SELECT * FROM metabib.keyword_field_entry
3722                                                 UNION ALL
3723                         SELECT * FROM metabib.identifier_field_entry
3724                                                 UNION ALL
3725                         SELECT * FROM metabib.title_field_entry
3726                                                 UNION ALL
3727                         SELECT * FROM metabib.subject_field_entry
3728                                                 UNION ALL
3729                         SELECT * FROM metabib.series_field_entry
3730                 </oils_persist:source_definition>
3731                 <fields>
3732                         <field name="field" reporter:datatype="link"/>
3733                         <field name="id" reporter:datatype="id" />
3734                         <field name="source" reporter:datatype="link"/>
3735                         <field name="value"  reporter:datatype="text"/>
3736                 </fields>
3737                 <links>
3738                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3739                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3740                 </links>
3741         </class>
3742         <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">
3743                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3744                         <field name="field" reporter:datatype="link"/>
3745                         <field name="id" reporter:datatype="id" />
3746                         <field name="source" reporter:datatype="link"/>
3747                         <field name="value"  reporter:datatype="text"/>
3748                 </fields>
3749                 <links>
3750                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3751                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3752                 </links>
3753         </class>
3754         <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">
3755                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3756                         <field name="accepting_usr" reporter:datatype="link"/>
3757                         <field name="amount" reporter:datatype="money" />
3758                         <field name="amount_collected" reporter:datatype="money" />
3759                         <field name="cash_drawer" reporter:datatype="link"/>
3760                         <field name="id" reporter:datatype="id" />
3761                         <field name="note"  reporter:datatype="text"/>
3762                         <field name="payment_ts" reporter:datatype="timestamp"/>
3763                         <field name="xact" reporter:datatype="link"/>
3764                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3765                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3766                 </fields>
3767                 <links>
3768                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3769                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3770                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3771                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3772                 </links>
3773         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3774             <actions>
3775                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3776                     <context link="xact" jump="usr" field="home_ou"/>
3777                 </retrieve>
3778                         </actions>
3779                 </permacrud>
3780         </class>
3781         <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">
3782                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3783                         <field name="accepting_usr" reporter:datatype="link"/>
3784                         <field name="amount" reporter:datatype="money" />
3785                         <field name="amount_collected" reporter:datatype="money" />
3786                         <field name="id" reporter:datatype="id" />
3787                         <field name="note"  reporter:datatype="text"/>
3788                         <field name="payment_ts" reporter:datatype="timestamp"/>
3789                         <field name="xact" reporter:datatype="link"/>
3790                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3791                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3792                 </fields>
3793                 <links>
3794                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3795                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3796                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3797                 </links>
3798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3799             <actions>
3800                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3801                     <context link="xact" jump="usr" field="home_ou"/>
3802                 </retrieve>
3803                         </actions>
3804                 </permacrud>
3805         </class>
3806         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3807                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3808                         <field name="accepting_usr" reporter:datatype="link"/>
3809                         <field name="amount" reporter:datatype="money" />
3810                         <field name="amount_collected" reporter:datatype="money" />
3811                         <field name="id" reporter:datatype="id" />
3812                         <field name="note"  reporter:datatype="text"/>
3813                         <field name="payment_ts" reporter:datatype="timestamp"/>
3814                         <field name="xact" reporter:datatype="link"/>
3815                         <field name="billing" reporter:datatype="link"/>
3816                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3817                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3818                 </fields>
3819                 <links>
3820                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3821                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3822                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3823                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3824                 </links>
3825         </class>
3826         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3827                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3828                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3829                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3830                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3831                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3832                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3833                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3834                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3835                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3836                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3837                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3838                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3839                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3840                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3841                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3842                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3843                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3844                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3845                 </fields>
3846                 <links>
3847                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3848                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3849                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3850                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3851                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3852                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3853                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3854                 </links>
3855         </class>
3856
3857         <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">
3858                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3859                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3860                         <field name="name"  reporter:datatype="text"/>
3861                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3862                         <field name="block_list" reporter:datatype="text"/>
3863                         <field name="staff_alert" reporter:datatype="bool"/>
3864                         <field name="org_depth" reporter:datatype="int"/>
3865                         <field name="ignore_proximity" reporter:datatype="int"/>
3866                 </fields>
3867                 <links/>
3868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3869             <actions>
3870                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3871                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3872                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3873                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3874             </actions>
3875         </permacrud>
3876         </class>
3877         <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">
3878                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3879                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3880                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3881                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3882                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3883                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3884                 </fields>
3885                 <links>
3886                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3887                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3888                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3889         </links>
3890         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3891             <actions>
3892                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3893                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3894                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3895                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3896             </actions>
3897         </permacrud>
3898         </class>
3899         <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">
3900                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3901                         <field name="holdable" reporter:datatype="bool"/>
3902                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3903                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3904                         <field name="opac_visible" reporter:datatype="bool"/>
3905             <field name="copy_active" reporter:datatype="bool"/>
3906             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3907             <field name="is_available" reporter:datatype="bool"/>
3908                 </fields>
3909                 <links/>
3910         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3911             <actions>
3912                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3913                 <retrieve/>
3914                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3915                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3916             </actions>
3917         </permacrud>
3918         </class>
3919         <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">
3920                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3921                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3922                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3923                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3924                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3925                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3926                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3927                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3928                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3929                 </fields>
3930                 <links>
3931                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3932                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3933                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3934                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3935                 </links>
3936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3937                         <actions>
3938                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3939                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3940                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3941                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3942                         </actions>
3943                 </permacrud>
3944         </class>
3945         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3946                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3947                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3948                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3949                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3950                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3951                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3952                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3953                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3954                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3955                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3956                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3957                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3958                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3959                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3960                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3961                 </fields>
3962                 <links>
3963                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3964                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3965                 </links>
3966         </class>
3967         <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">
3968                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3969                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3970                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3971                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3972                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3973                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3974                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3975                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3976                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3977                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3978                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3979                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3980                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3981                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3982                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3983                 </fields>
3984                 <links>
3985                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3986                 </links>
3987                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3988                         <actions>
3989                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3990                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3991                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3992                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3993                         </actions>
3994                 </permacrud>
3995         </class>
3996
3997
3998         <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">
3999                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4000                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4001                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4002                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4003                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4004                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4005                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4006                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4007                 </fields>
4008                 <links>
4009                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4010                 </links>
4011         </class>
4012
4013         <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">
4014                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4015                         <field name="call_number" />
4016                         <field name="create_date" reporter:datatype="timestamp"/>
4017                         <field name="creator" reporter:datatype="link"/>
4018                         <field name="id" reporter:datatype="id" />
4019                         <field name="pub" reporter:datatype="bool"/>
4020                         <field name="title"  reporter:datatype="text"/>
4021                         <field name="value"  reporter:datatype="text"/>
4022                 </fields>
4023                 <links>
4024                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4025                 </links>
4026         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4027             <actions>
4028                 <create permission="CREATE_VOLUME_NOTE">
4029                     <context link="call_number" field="owning_lib"/>
4030                 </create>
4031                 <retrieve permission="VIEW_VOLUME_NOTES">
4032                     <context link="call_number" field="owning_lib"/>
4033                 </retrieve>
4034                 <update permission="UPDATE_VOLUME_NOTE">
4035                     <context link="call_number" field="owning_lib"/>
4036                 </update>
4037                 <delete permission="DELETE_VOLUME_NOTE">
4038                     <context link="call_number" field="owning_lib"/>
4039                 </delete>
4040             </actions>
4041         </permacrud>
4042         </class>
4043         <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">
4044                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4045                         <field name="create_date" reporter:datatype="timestamp"/>
4046                         <field name="creator" reporter:datatype="link"/>
4047                         <field name="edit_date" reporter:datatype="timestamp"/>
4048                         <field name="editor" reporter:datatype="link"/>
4049                         <field name="id" reporter:datatype="id" />
4050                         <field name="record" reporter:datatype="link"/>
4051                         <field name="value" reporter:datatype="text"/>
4052                 </fields>
4053                 <links>
4054                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4055                 </links>
4056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4057             <actions>
4058                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4059                 <retrieve/>
4060                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4061                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4062             </actions>
4063         </permacrud>
4064         </class>
4065         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4066         <oils_persist:source_definition>
4067 SELECT  usr,
4068         SUM(
4069             CASE
4070                 WHEN (
4071                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > '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 out,
4077
4078         SUM(
4079             CASE
4080                 WHEN (
4081                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4082                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4083                 ) THEN 1
4084                 ELSE 0
4085             END
4086         ) AS overdue,
4087
4088         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4089         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4090         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4091   FROM  action.circulation
4092   WHERE checkin_time IS NULL
4093   GROUP BY 1
4094         </oils_persist:source_definition>
4095         <fields oils_persist:primary="usr">
4096             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4097             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4098             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4099             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4100             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4101             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4102         </fields>
4103         <links>
4104             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4105         </links>
4106         </class>
4107         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4108         <oils_persist:source_definition>
4109 SELECT  usr,
4110         STRING_AGG(
4111             CASE
4112                 WHEN (
4113                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > '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 out,
4119
4120         STRING_AGG(
4121             CASE
4122                 WHEN (
4123                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4124                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4125                 ) THEN id::TEXT
4126                 ELSE '0'
4127             END
4128         ,',') AS overdue,
4129
4130         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4131         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4132         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4133   FROM  action.circulation
4134   WHERE checkin_time IS NULL
4135   GROUP BY 1
4136         </oils_persist:source_definition>
4137         <fields oils_persist:primary="usr">
4138             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4139             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4140             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4141             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4142             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4143             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4144         </fields>
4145         <links>
4146             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4147         </links>
4148         </class>
4149         <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">
4150                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4151                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4152                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4153                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4154                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4155                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4156                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4157                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4158                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4159                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4160                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4161                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4162                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4163                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4164                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4165                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4166                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4167                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4168                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4169                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4170                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4171                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4172                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4173                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4174                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4175                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4176                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4177                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4178                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4179                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4180                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4181                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4182                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4183                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4184                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4185                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4186                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4187                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4188                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4189                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4190                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4191                 </fields>
4192                 <links>
4193                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4194                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4195                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4196                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4197                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4198                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4199                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4200                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4201                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4202                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4203                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4204                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4205                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4206                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4207                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4208                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4209                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4210                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4211                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4212                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4213                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4214                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4215                 </links>
4216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4217                         <actions>
4218                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4219                         </actions>
4220                 </permacrud>
4221         </class>
4222         <class id="aacct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_combined_types" oils_persist:tablename="action.all_circulation_combined_types" reporter:core="true" reporter:label="All Circulation Combined Types" oils_persist:readonly="true">
4223                 <fields>
4224                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4225                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4226                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4227                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4228                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4229                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4230                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4231                 </fields>
4232                 <links>
4233                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4234                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4235                 </links>
4236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4237                         <actions>
4238                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4239                         </actions>
4240                 </permacrud>
4241         </class>
4242         <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">
4243                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4244                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4245                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4246                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4247                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4248                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4249                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4250                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4251                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4252                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4253                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4254                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4255                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4256                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4257                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4258                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4259                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4260                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4261                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4262                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4263                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4264                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4265                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4266                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4267                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4268                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4269                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4270                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4271                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4272                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4273                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4274                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4275                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4276                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4277                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4278                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4279                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4280                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4281                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4282                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4283                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4284                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4285                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4286                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4287                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4288                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4289                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4290                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4291                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4292                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4293                 </fields>
4294                 <links>
4295                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4296                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4297                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4298                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4299                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4300                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4301                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4302                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4303                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4304                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4305                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4306                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4307                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4308                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4309                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4310                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4311                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4312                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4313                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4314                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4315                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4316                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4317                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4318                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4319                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4320                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4321                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4322                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4323                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4324                 </links>
4325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4326                         <actions>
4327                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4328                         </actions>
4329                 </permacrud>
4330         </class>
4331         <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">
4332                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4333                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4334                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4335                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4336                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4337                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4338                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4339                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4340                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4341                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4342                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4343                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4344                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4345                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4346                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4347                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4348                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4349                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4350                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4351                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4352                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4353                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4354                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4355                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4356                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4357                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4358                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4359                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4360                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4361                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4362                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4363                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4364                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4365                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4366                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4367                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4368                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4369                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4370                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4371                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4372                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4373                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4374                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4375                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4376                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4377                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4378                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4379                 </fields>
4380                 <links>
4381                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4382                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4383                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4384                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4385                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4386                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4387                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4388                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4389                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4390                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4391                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4392                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4393                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4394                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4395                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4396                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4397                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4398                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4399                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4400                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4401                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4402                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4403                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4404                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4405                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4406                 </links>
4407         </class>
4408         <class id="auch" 
4409                 controller="open-ils.cstore" 
4410                 oils_obj:fieldmapper="action::user_circ_history" 
4411                 oils_persist:tablename="action.usr_circ_history" 
4412                 reporter:label="User Checkout History">
4413                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4414                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4415                         <!-- prevent reporting on the user that owns the checkout history -->
4416                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4417                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4418                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4419                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4420                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4421                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4422                 </fields>
4423                 <links>
4424                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4425                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4426                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4427                 </links>
4428         </class>
4429         <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">
4430                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4431                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4432                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4433                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4434                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4435                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4436                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4437                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4438                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4439                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4440                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4441                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4442                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4443                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4444                 </fields>
4445                 <links>
4446                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4447                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4448                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4449                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4450                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4451                 </links>
4452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4453                         <actions>
4454                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4455                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4456                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4457                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4458                         </actions>
4459                 </permacrud>
4460         </class>
4461
4462         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4463                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4464                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4465                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4466                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4467                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4468                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4469                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4470                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4471                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4472                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4473                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4474                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4475                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4476                 </fields>
4477                 <links>
4478                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4479                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4480                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4481                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4482                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4483                 </links>
4484                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4485                         <actions>
4486                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4487                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4488                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4489                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4490                         </actions>
4491                 </permacrud>
4492         </class>
4493         
4494         <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">
4495                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4496                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4497                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4498                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4499                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4500                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4501                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4502                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4503                 </fields>
4504                 <links>
4505                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4506                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4507                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4508                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4509                 </links>
4510                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4511                         <actions>
4512                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4513                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4514                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4515                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4516                         </actions>
4517                 </permacrud>
4518         </class>
4519         
4520         <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">
4521                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4522                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4523                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4524                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4525                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4526                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4527                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4528                 </fields>
4529                 <links>
4530                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4531                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4532                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4533                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4534                 </links>
4535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4536                         <actions>
4537                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4538                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4539                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4540                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4541                         </actions>
4542                 </permacrud>
4543         </class>
4544         
4545         <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">
4546                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4547                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4548                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4549                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4550                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4551                 </fields>
4552                 <links>
4553                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4554                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4555                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4556                 </links>
4557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4558                         <actions>
4559                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4560                     <context link="resource" field="owner" />
4561                 </create>
4562                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4563                     <context link="resource" field="owner" />
4564                 </retrieve>
4565                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4566                     <context link="resource" field="owner" />
4567                 </update>
4568                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4569                     <context link="resource" field="owner" />
4570                 </delete>
4571                         </actions>
4572                 </permacrud>
4573         </class>
4574         
4575         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4576                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4577                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4578                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4579                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4580                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4581                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4582                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4583                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4584                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4585                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4586                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4587                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4588                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4589                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4590                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4591                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4592                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4593                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4594                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4595                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4596                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4597                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4598                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4599                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4600                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4601                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4602                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4603                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4604                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4605                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4606                 </fields>
4607                 <links>
4608                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4609                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4610                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4611                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4612                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4613                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4614                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4615                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4616                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4617                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4618                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4619                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4620                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4621                 </links>
4622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4623                         <actions>
4624                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4625                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4626                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4627                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4628                         </actions>
4629                 </permacrud>
4630         </class>
4631         
4632         <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">
4633                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4634                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4635                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4636                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4637                 </fields>
4638                 <links>
4639                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4640                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4641                 </links>
4642                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4643                         <actions>
4644                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4645                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4646                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4647                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4648                         </actions>
4649                 </permacrud>
4650         </class>
4651
4652         <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">
4653                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4654                         <field name="bucket" reporter:datatype="link"/>
4655                         <field name="id" reporter:datatype="id" />
4656                         <field name="target_call_number" reporter:datatype="link" />
4657                         <field name="create_time" reporter:datatype="timestamp" />
4658                         <field name="pos" reporter:datatype="int" />
4659                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4660                 </fields>
4661                 <links>
4662                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4663                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4664             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4665                 </links>
4666         </class>
4667         <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">
4668                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4669                         <field name="id" reporter:datatype="id" />
4670                         <field name="item" reporter:datatype="link"/>
4671                         <field name="note" reporter:datatype="text" />
4672                 </fields>
4673                 <links>
4674                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4675                 </links>
4676         </class>
4677         <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">
4678                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4679                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4680                         <field name="btype" reporter:datatype="text"/>
4681                         <field name="id" reporter:datatype="id" />
4682                         <field name="name" reporter:datatype="text"/>
4683                         <field name="description" reporter:datatype="text"/>
4684                         <field name="owner" reporter:datatype="link"/>
4685                         <field name="pub" reporter:datatype="bool"/>
4686                         <field name="create_time" reporter:datatype="timestamp" />
4687                 </fields>
4688                 <links>
4689                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4690                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4691                 </links>
4692         </class>
4693         <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">
4694                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4695                         <field name="id" reporter:datatype="id" />
4696                         <field name="bucket" reporter:datatype="link"/>
4697                         <field name="note" reporter:datatype="text" />
4698                 </fields>
4699                 <links>
4700                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4701                 </links>
4702         </class>
4703         <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">
4704                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4705                         <field name="hold" reporter:datatype="link"/>
4706                         <field name="id" reporter:datatype="id" />
4707                         <field name="target_copy" reporter:datatype="link"/>
4708                         <field name="proximity" reporter:datatype="number"/>
4709                 </fields>
4710                 <links>
4711                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4712                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4713                 </links>
4714         </class>
4715         <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">
4716                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4717                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4718                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4719                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4720                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4721                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4722                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4723                 </fields>
4724                 <links>
4725                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4726                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4727                 </links>
4728         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4729             <actions>
4730                 <create permission="CREATE_HOLD_NOTIFICATION">
4731                                         <context link="hold" jump="usr" field="home_ou" />
4732                                 </create>
4733                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4734                                         <context link="hold" jump="usr" field="home_ou" />
4735                                 </retrieve>
4736                 <update permission="CREATE_HOLD_NOTIFICATION">
4737                                         <context link="hold" jump="usr" field="home_ou" />
4738                                 </update>
4739                 <delete permission="CREATE_HOLD_NOTIFICATION">
4740                                         <context link="hold" jump="usr" field="home_ou" />
4741                                 </delete>
4742             </actions>
4743         </permacrud>
4744         </class>
4745         <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">
4746                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4747                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4748                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4749                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4750                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4751                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4752                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4753                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4754                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4755                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4756                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4757                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4758                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4759                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4760                 </fields>
4761                 <links>
4762                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4763                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4764                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4765                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4766                 </links>
4767         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4768             <actions>
4769                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4770                 <retrieve/>
4771                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4772                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4773             </actions>
4774         </permacrud>
4775         </class>
4776         <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">
4777                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4778                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4779                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4780                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4781                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4782             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4783             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4784             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4785                 </fields>
4786                 <links>
4787                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4788                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4789                 </links>
4790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4791             <actions>
4792                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4793                 <retrieve/>
4794                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4795                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4796             </actions>
4797         </permacrud>
4798         </class>
4799         <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">
4800                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4801                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4802             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4803             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4804                 </fields>
4805                 <links>
4806                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4807                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4808                 </links>
4809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4810             <actions>
4811                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4812                                         <context link="lgroup" field="owner" />
4813                 </create>
4814                 <retrieve/>
4815                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4816                                         <context link="lgroup" field="owner" />
4817                 </update>
4818                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4819                                         <context link="lgroup" field="owner" />
4820                 </delete>
4821             </actions>
4822         </permacrud>
4823         </class>
4824
4825     <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">
4826         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4827             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4828             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4829             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4830             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4831         </fields>
4832         <links>
4833             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4834             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4835         </links>
4836         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4837             <actions>
4838                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4839                 <retrieve/>
4840                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4841                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4842             </actions>
4843         </permacrud>
4844     </class>
4845
4846         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4847                 <fields>
4848                         <field name="sre_id" oils_persist:virtual="true" />
4849                         <field name="location" oils_persist:virtual="true" />
4850                         <field name="owning_lib" oils_persist:virtual="true" />
4851                         <field name="basic_holdings" oils_persist:virtual="true" />
4852                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4853                         <field name="supplement_holdings" oils_persist:virtual="true" />
4854                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4855                         <field name="index_holdings" oils_persist:virtual="true" />
4856                         <field name="index_holdings_add" oils_persist:virtual="true" />
4857                         <field name="online" oils_persist:virtual="true" />
4858                         <field name="missing" oils_persist:virtual="true" />
4859                         <field name="incomplete" oils_persist:virtual="true" />
4860                 </fields>
4861         </class>
4862
4863         <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">
4864                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4865                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4866                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4867                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4868                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4869                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4870                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4871                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4872                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4873                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4874                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4875                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4876                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4877                 </fields>
4878                 <links>
4879                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4880                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4881                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4882                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4883                 </links>
4884                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4885                         <actions>
4886                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4887                                 <retrieve/>
4888                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4889                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4890                         </actions>
4891                 </permacrud>
4892         </class>
4893
4894         <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">
4895                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4896                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4897                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4898                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4899                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4900                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4901                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4902                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4903                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4904                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4905                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4906                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4907                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4908                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4909                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4910                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4911                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4912                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4913                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4914                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4915                 </fields>
4916                 <links>
4917                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4918                 </links>
4919                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4920                         <actions>
4921                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4922                                         <context link="subscription" field="owning_lib" />
4923                                 </create>
4924                                 <retrieve />
4925                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4926                                         <context link="subscription" field="owning_lib" />
4927                                 </update>
4928                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4929                                         <context link="subscription" field="owning_lib" />
4930                                 </delete>
4931                         </actions>
4932                 </permacrud>
4933         </class>
4934
4935         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4936                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4937                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4938                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4939                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4940                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4941                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4942                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4943                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4944                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4945                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4946                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4947                 </fields>
4948                 <links>
4949                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4950                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4951                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4952                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4953                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4954                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4955                 </links>
4956                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4957                         <actions>
4958                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4959                                 <retrieve />
4960                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4961                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4962                         </actions>
4963                 </permacrud>
4964         </class>
4965
4966         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4967                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4968                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4969                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4970                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4971                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4972                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4973                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4974                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4975                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4976                 </fields>
4977                 <links>
4978                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4979                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4980                 </links>
4981         </class>
4982
4983         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4984                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4985                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4986                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4987                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4988                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4989                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4990                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4991                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4992                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4993                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4994                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4995                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4996                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4997                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4998                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4999                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5000                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5001                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5002                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5003                 </fields>
5004                 <links>
5005                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5006                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5007                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5008                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5009                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5010                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5011                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5012                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5013                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5014                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5015                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5016                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5017                 </links>
5018                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5019                         <actions>
5020                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5021                                 <retrieve />
5022                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5023                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5024                         </actions>
5025                 </permacrud>
5026         </class>
5027
5028         <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">
5029                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5030                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5031                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5032                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5033                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5034                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5035                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5036                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5037                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5038                 </fields>
5039                 <links>
5040                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5041                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5042                 </links>
5043                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5044                         <actions>
5045                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5046                                         <context link="distribution" field="holding_lib" />
5047                                 </create>
5048                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5049                                         <context link="distribution" field="holding_lib" />
5050                                 </retrieve>
5051                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5052                                         <context link="distribution" field="holding_lib" />
5053                                 </update>
5054                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5055                                         <context link="distribution" field="holding_lib" />
5056                                 </delete>
5057                         </actions>
5058                 </permacrud>
5059         </class>
5060
5061         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5062                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5063                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5064                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5065                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5066                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5067                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5068                 </fields>
5069                 <links>
5070                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5071                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
5072                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5073                 </links>
5074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5075                         <actions>
5076                                 <create permission="ADMIN_SERIAL_STREAM">
5077                                         <context link="distribution" field="holding_lib" />
5078                                 </create>
5079                                 <retrieve />
5080                                 <update permission="ADMIN_SERIAL_STREAM">
5081                                         <context link="distribution" field="holding_lib" />
5082                                 </update>
5083                                 <delete permission="ADMIN_SERIAL_STREAM">
5084                                         <context link="distribution" field="holding_lib" />
5085                                 </delete>
5086                         </actions>
5087                 </permacrud>
5088         </class>
5089
5090         <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">
5091                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5092                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5093                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5094                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5095                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5096                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5097                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5098                 </fields>
5099                 <links>
5100                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5101                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5102                 </links>
5103                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5104                         <actions>
5105                                 <create permission="ADMIN_SERIAL_STREAM">
5106                                         <context link="stream" jump="distribution" field="holding_lib" />
5107                                 </create>
5108                                 <retrieve permission="RECEIVE_SERIAL">
5109                                         <context link="stream" jump="distribution" field="holding_lib" />
5110                                 </retrieve>
5111                                 <update permission="ADMIN_SERIAL_STREAM">
5112                                         <context link="stream" jump="distribution" field="holding_lib" />
5113                                 </update>
5114                                 <delete permission="ADMIN_SERIAL_STREAM">
5115                                         <context link="stream" jump="distribution" field="holding_lib" />
5116                                 </delete>
5117                         </actions>
5118                 </permacrud>
5119         </class>
5120
5121         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5122                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5123                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5124                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5125                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5126                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5127                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5128                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5129                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5130                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5131                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5132                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5133                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5134                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5135                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5136                 </fields>
5137                 <links>
5138                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5139                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5140                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5141                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5142                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5143                 </links>
5144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5145                         <actions>
5146                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5147                                         <context link="subscription" field="owning_lib" />
5148                                 </create>
5149                                 <retrieve/>
5150                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5151                                         <context link="subscription" field="owning_lib" />
5152                                 </update>
5153                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5154                                         <context link="subscription" field="owning_lib" />
5155                                 </delete>
5156                         </actions>
5157                 </permacrud>
5158         </class>
5159
5160         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5161                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5162                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5163                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5164                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5165                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5166                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5167                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5168                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5169                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5170                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5171                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5172                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5173                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5174                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5175                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5176                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5177                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5178                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5179                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5180                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5181                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5182                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5183                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5184                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5185                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5186                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5187                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5188                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5189                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5190                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5191                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5192                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5193                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5194                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5195                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5196                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5197                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5198                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5199                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5200                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5201                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5202                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5203                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5204                 </fields>
5205                 <links>
5206                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5207                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5208                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5209                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5210                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5211                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5212                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5213                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5214                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5215                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5216                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5217                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5218                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5219                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5220                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5221                 </links>
5222                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5223                         <actions>
5224                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5225                                 <retrieve/>
5226                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5227                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5228                         </actions>
5229                 </permacrud>
5230         </class>
5231
5232         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5233                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5234                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5235                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5236                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5237                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5238                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5239                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5240                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5241                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5242                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5243                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5244                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5245                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5246                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5247                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5248                 </fields>
5249                 <links>
5250                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5251                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5252                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5253                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5254                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5255                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5256                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5257                 </links>
5258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5259                         <actions>
5260                                 <create permission="ADMIN_SERIAL_ITEM">
5261                                         <context link="stream" jump="distribution" field="holding_lib" />
5262                                 </create>
5263                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5264                                         <context link="stream" jump="distribution" field="holding_lib" />
5265                                 </retrieve>
5266                                 <update permission="ADMIN_SERIAL_ITEM">
5267                                         <context link="stream" jump="distribution" field="holding_lib" />
5268                                 </update>
5269                                 <delete permission="ADMIN_SERIAL_ITEM">
5270                                         <context link="stream" jump="distribution" field="holding_lib" />
5271                                 </delete>
5272                         </actions>
5273                 </permacrud>
5274         </class>
5275
5276         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5277                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5278                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5279                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5280                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5281                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5282                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5283                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5284                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5285                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5286                 </fields>
5287                 <links>
5288                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5289                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5290                 </links>
5291                 <!-- Not available via PCRUD at this time -->
5292         </class>
5293         <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">
5294                 <fields>
5295                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5296                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5297                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5298                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5299                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5300                 </fields>
5301                 <links>
5302                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5303                 </links>
5304         </class>
5305         <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">
5306                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5307                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5308                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5309                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5310                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5311                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5312                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5313                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5314                 </fields>
5315                 <links>
5316                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5317                 </links>
5318         </class>
5319         <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">
5320                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5321                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5322                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5323                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5324                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5325                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5326                 </fields>
5327                 <links>
5328                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5329                 </links>
5330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5331                         <actions>
5332                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5333                                         <context link="distribution" field="holding_lib" />
5334                                 </create>
5335                                 <retrieve/>
5336                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5337                                         <context link="distribution" field="holding_lib" />
5338                                 </update>
5339                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5340                                         <context link="distribution" field="holding_lib" />
5341                                 </delete>
5342                         </actions>
5343                 </permacrud>
5344         </class>
5345
5346         <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">
5347                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5348                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5349                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5350                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5351                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5352                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5353                 </fields>
5354                 <links>
5355                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5356                 </links>
5357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5358                         <actions>
5359                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5360                                         <context link="distribution" field="holding_lib" />
5361                                 </create>
5362                                 <retrieve/>
5363                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5364                                         <context link="distribution" field="holding_lib" />
5365                                 </update>
5366                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5367                                         <context link="distribution" field="holding_lib" />
5368                                 </delete>
5369                         </actions>
5370                 </permacrud>
5371         </class>
5372
5373         <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">
5374                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5375                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5376                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5377                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5378                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5379                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5380                 </fields>
5381                 <links>
5382                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5383                 </links>
5384                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5385                         <actions>
5386                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5387                                         <context link="distribution" field="holding_lib" />
5388                                 </create>
5389                                 <retrieve/>
5390                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5391                                         <context link="distribution" field="holding_lib" />
5392                                 </update>
5393                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5394                                         <context link="distribution" field="holding_lib" />
5395                                 </delete>
5396                         </actions>
5397                 </permacrud>
5398         </class>
5399
5400         <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">
5401                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5402                         <field name="id" reporter:datatype="id" />
5403                         <field name="owning_copy" reporter:datatype="link"/>
5404                         <field name="stat_cat" reporter:datatype="link"/>
5405                         <field name="stat_cat_entry" reporter:datatype="link"/>
5406                 </fields>
5407                 <links>
5408                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5409                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5410                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5411                 </links>
5412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5413                         <actions>
5414                                 <retrieve/>
5415                         </actions>
5416                 </permacrud>
5417         </class>
5418         <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">
5419                 <fields oils_persist:primary="code">
5420                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5421                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5422                 </fields>
5423                 <links/>
5424         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5425             <actions>
5426                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5427                 <retrieve/>
5428                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5429                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5430             </actions>
5431         </permacrud>
5432         </class>
5433         <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">
5434                 <fields oils_persist:primary="code">
5435                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5436                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5437                 </fields>
5438                 <links/>
5439         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5440             <actions>
5441                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5442                 <retrieve/>
5443                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5444                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5445             </actions>
5446         </permacrud>
5447         </class>
5448         <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">
5449                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5450                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5451                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5452                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5453                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5454                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5455                 </fields>
5456                 <links>
5457             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5458         </links>
5459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5460             <actions>
5461                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5462                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5463                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5464                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5465             </actions>
5466         </permacrud>
5467         </class>
5468         <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">
5469                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5470                         <field name="id" reporter:datatype="id" />
5471                         <field name="name" reporter:datatype="text"/>
5472                 </fields>
5473                 <links/>
5474         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5475             <actions>
5476                 <create permission="CREATE_LASSO" global_required="true"/>
5477                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5478                 <update permission="UPDATE_LASSO" global_required="true"/>
5479                 <delete permission="DELETE_LASSO" global_required="true"/>
5480             </actions>
5481         </permacrud>
5482         </class>
5483         <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">
5484                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5485                         <field name="id" reporter:datatype="id" />
5486                         <field name="lasso" reporter:datatype="link"/>
5487                         <field name="org_unit" reporter:datatype="org_unit"/>
5488                 </fields>
5489                 <links>
5490                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5491                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5492                 </links>
5493         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5494             <actions>
5495                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5496                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5497                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5498                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5499             </actions>
5500         </permacrud>
5501         </class>
5502         <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">
5503                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5504                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5505                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5506                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5507                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5508                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5509                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5510                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5511                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5512                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5513                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5514                 </fields>
5515                 <links>
5516                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5517                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5518                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5519                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5520                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5521                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5522                 </links>
5523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5524             <actions>
5525                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5526                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5527                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5528                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5529             </actions>
5530         </permacrud>
5531         </class>
5532         <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">
5533                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5534                         <field name="id" reporter:datatype="id" />
5535                         <field name="from_org" reporter:datatype="org_unit"/>
5536                         <field name="to_org" reporter:datatype="org_unit"/>
5537                         <field name="prox" reporter:datatype="int" />
5538                 </fields>
5539                 <links>
5540                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5541                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5542                 </links>
5543         </class>
5544         <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">
5545                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5546                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5547                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5548                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5549                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5550                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5551                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5552                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5553                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5554                 </fields>
5555                 <links/>
5556         </class>
5557         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5558                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5559                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5560                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5561                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5562                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5563                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5564                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5565                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5566                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5567                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5568                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5569                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5570                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5571                 </fields>
5572                 <links>
5573                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5574                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5575                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5576                 </links>
5577         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5578             <actions>
5579                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5580                 <retrieve/>
5581                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5582                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5583             </actions>
5584         </permacrud>
5585         </class>
5586         <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">
5587                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5588                         <field name="address_type"  reporter:datatype="text"/>
5589                         <field name="city"  reporter:datatype="text"/>
5590                         <field name="country"  reporter:datatype="text"/>
5591                         <field name="county"  reporter:datatype="text"/>
5592                         <field name="id" reporter:datatype="id" />
5593                         <field name="org_unit" reporter:datatype="org_unit"/>
5594                         <field name="post_code"  reporter:datatype="text"/>
5595                         <field name="state"  reporter:datatype="text"/>
5596                         <field name="street1"  reporter:datatype="text"/>
5597                         <field name="street2"  reporter:datatype="text"/>
5598                         <field name="valid" reporter:datatype="bool"/>
5599                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5600                 </fields>
5601                 <links>
5602                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5603                 </links>
5604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5605             <actions>
5606                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5607                 <retrieve/>
5608                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5609                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5610             </actions>
5611         </permacrud>
5612         </class>
5613         <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">
5614                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5615                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5616                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5617                         <field name="query_text" reporter:datatype="text"/>
5618                 </fields>
5619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5620             <actions>
5621                 <retrieve/>
5622             </actions>
5623         </permacrud>
5624         </class>
5625
5626         <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">
5627                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5628                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5629                         <field name="owner" reporter:datatype="org_unit"/>
5630                         <field name="code" reporter:datatype="text"/>
5631                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5632                         <field name="create_date" reporter:datatype="timestamp"/>
5633                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5634                 </fields>
5635                 <links>
5636                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5637                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5638                 </links>
5639         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5640             <actions>
5641                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5642                 <retrieve/>
5643                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5644                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5645             </actions>
5646         </permacrud>
5647         </class>
5648         <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">
5649                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5650                         <field name="id" reporter:datatype="id"/>
5651                         <field name="grp" reporter:datatype="link"/>
5652                         <field name="pos" reporter:datatype="int"/>
5653                         <field name="query" reporter:datatype="link"/>
5654                 </fields>
5655                 <links>
5656                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5657                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5658                 </links>
5659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5660             <actions>
5661                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5662                     <context link="grp" field="owner"/>
5663                 </create>
5664                 <retrieve/>
5665                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5666                     <context link="grp" field="owner"/>
5667                 </update>
5668                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5669                     <context link="grp" field="owner"/>
5670                 </delete>
5671             </actions>
5672         </permacrud>
5673         </class>
5674
5675         <!-- A note: Please update alhr and ahopl when updating ahr -->
5676         <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">
5677                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5678                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5679                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5680                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5681                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5682                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5683                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5684                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5685                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5686                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5687                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5688                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5689                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5690                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5691                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5692                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5693                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5694                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5695                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5696                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5697                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5698                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5699                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5700                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5701                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5702                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5703                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5704                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5705                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5706                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5707                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5708                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5709                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5710                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5711                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5712                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5713                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5714                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5715                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5716                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5717                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5718                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5719                 </fields>
5720                 <links>
5721                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5722                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5723                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5724                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5725                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5726                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5727                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5728                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5729                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5730                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5731                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5732                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5733                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5734                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5735                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5736                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5737                 </links>
5738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5739                         <actions>
5740                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5741                         </actions>
5742                 </permacrud>
5743         </class>
5744         <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">
5745                 <oils_persist:source_definition><![CDATA[
5746                 SELECT
5747                         ahr.*,
5748                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5749                                 copy_location_order_position,
5750                         CASE WHEN au.alias IS NOT NULL THEN
5751                                 au.alias
5752                         ELSE
5753                                 au.first_given_name
5754                         END AS usr_alias_or_first_given_name,
5755                         au.first_given_name AS usr_first_given_name,
5756                         au.second_given_name AS usr_second_given_name,
5757                         au.family_name AS usr_family_name,
5758                         au.prefix AS usr_prefix,
5759                         au.suffix AS usr_suffix,
5760                         au.alias AS usr_alias,
5761                         CASE WHEN au.alias IS NOT NULL THEN
5762                                 au.alias
5763                         ELSE
5764                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5765                                         COALESCE(au.family_name, ''),
5766                                         COALESCE(au.suffix, ''),
5767                                         ', ',
5768                                         COALESCE(au.prefix, ''),
5769                                         COALESCE(au.first_given_name, ''),
5770                                         COALESCE(au.second_given_name, '')
5771                                 ], ' '), E'\\s+,', ',')
5772                         END AS usr_alias_or_display_name,
5773                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5774                                 COALESCE(au.family_name, ''),
5775                                 COALESCE(au.suffix, ''),
5776                                 ', ',
5777                                 COALESCE(au.prefix, ''),
5778                                 COALESCE(au.first_given_name, ''),
5779                                 COALESCE(au.second_given_name, '')
5780                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5781                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5782                                 AS call_number_label,
5783                         siss.label AS issuance_label,
5784                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5785                         ahcm_1.copy_count AS potential_copies
5786                 FROM action.hold_request ahr
5787                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5788                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5789                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5790                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5791                 JOIN actor.usr au ON (au.id = ahr.usr)
5792                 JOIN (
5793                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5794                         FROM asset.copy_location
5795                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5796                 LEFT JOIN actor.usr_standing_penalty ausp 
5797                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5798                 LEFT JOIN config.standing_penalty csp
5799                         ON (
5800                                 csp.id = ausp.standing_penalty AND 
5801                                 csp.block_list LIKE '%CAPTURE%' AND (
5802                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5803                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5804                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5805                                         )
5806                                 )
5807                         )
5808                 JOIN (
5809                         SELECT COUNT(target_copy) AS copy_count, hold
5810                         FROM action.hold_copy_map
5811                         GROUP BY 2
5812                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5813                 LEFT JOIN serial.issuance siss
5814                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5815                 LEFT JOIN asset.copy_location_order acplo
5816                         ON (acp.location = acplo.location AND
5817                                 acp.circ_lib = acplo.org)
5818                 WHERE
5819                         ahr.capture_time IS NULL AND
5820                         ahr.cancel_time IS NULL AND
5821                         csp.id IS NULL AND
5822                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5823                         acp.status IN (0,7)
5824                 ]]></oils_persist:source_definition>
5825                 <fields oils_persist:primary="id">
5826                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5827                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5828                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5829                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5830                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5831                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5832                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5833                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5834                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5835                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5836                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5837                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5838                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5839                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5840                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5841                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5842                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5843                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5844                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5845                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5846                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5847                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5848                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5849                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5850                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5851                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5852                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5853                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5854                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5855                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5856                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5857                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5858                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5859                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5860                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5861                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5862                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5863                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5864                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5865                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5866                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5867                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5868                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5869                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5870                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5871                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5872                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5873                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5874                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5875                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5876                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5877                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5878                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5879                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5880                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5881                 </fields>
5882                 <links>
5883                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5884                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5885                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5886                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5887                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5888                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5889                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5890                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5891                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5892                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5893                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5894                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5895                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5896                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5897                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5898                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5899                 </links>
5900                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5901                         <actions>
5902                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5903                         </actions>
5904                 </permacrud>
5905         </class>
5906         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5907                 <oils_persist:source_definition>
5908                         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)
5909                 </oils_persist:source_definition>
5910                 <fields oils_persist:primary="id">
5911                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5912                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5913                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5914                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5915                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5916                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5917                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5918                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5919                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5920                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5921                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5922                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5923                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5924                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5925                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5926                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5927                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5928                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5929                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5930                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5931                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5932                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5933                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5934                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5935                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5936                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5937                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5938                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5939                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5940                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5941                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5942                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5943                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5944                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5945                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5946                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5947                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5948                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5949                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5950                 </fields>
5951                 <links>
5952                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5953                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5954                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5955                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5956                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5957                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5958                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5959                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5960                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5961                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5962                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5963                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5964                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5965                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5966                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5967                 </links>
5968         </class>
5969
5970         <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">
5971                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5972                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5973                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5974                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5975                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5976                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5977                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5978                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5979                 </fields>
5980                 <links>
5981                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5982                 </links>
5983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5984                         <actions>
5985                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5986                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5987                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5988                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5989                         </actions>
5990                 </permacrud>
5991         </class>
5992         <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">
5993                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5994                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5995                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5996                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5997                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5998                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5999                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6000                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6001                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6002                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6003                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6004                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6005                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6006                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6007                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6008                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6009                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6010                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6011                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6012                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6013                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6014                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6015                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6016                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6017                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6018                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6019                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6020                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6021                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6022                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6023                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6024                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6025                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6026                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6027                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6028                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6029                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6030                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6031                 </fields>
6032                 <links>
6033                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6034                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6035                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6036                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6037                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6038                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6039                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6040                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6041                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6042                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6043                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6044                 </links>
6045                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6046                         <actions>
6047                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6048                         </actions>
6049                 </permacrud>
6050         </class>
6051         <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">
6052                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6053                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6054                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6055                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6056                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6057                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6058                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6059                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6060                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6061                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6062                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6063                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6064                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6065                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6066                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6067                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6068                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6069                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6070                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6071                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6072                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6073                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6074                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6075                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6076                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6077                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6078                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6079                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6080                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6081                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6082                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6083                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6084                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6085                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6086                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6087                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6088                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6089                 </fields>
6090                 <links>
6091                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6092                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6093                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6094                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6095                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6096                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6097                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6098                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6099                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6100                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6101                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6102                 </links>
6103                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6104                         <actions>
6105                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6106                         </actions>
6107                 </permacrud>
6108         </class>
6109
6110         <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">
6111                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6112                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6113                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6114                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6115                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6116                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6117                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6118                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6119                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6120                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6121                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6122                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6123                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6124                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6125                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6126                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6127                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6128                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6129                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6130                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6131                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6132                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6133                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6134                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6135                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6136                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6137                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6138                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6139                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6140                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6141                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6142                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6143                 </fields>
6144                 <links>
6145                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6146                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6147                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6148                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6149                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6150                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6151                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6152                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6153                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6154                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6155                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6156                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6157                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6158                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6159                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6160                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6161                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6162                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6163                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6164                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6165                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6166                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6167                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6168                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6169                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6170                 </links>
6171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6172             <actions>
6173                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6174                 <retrieve />
6175                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6176                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6177             </actions>
6178         </permacrud>
6179         </class>
6180         <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">
6181                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6182                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6183                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6184                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6185                 </fields>
6186                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6187                         <actions>
6188                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6189                                 <retrieve/>
6190                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6191                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6192                         </actions>
6193                 </permacrud>
6194         </class>
6195         <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">
6196                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6197                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6198                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6199                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6200                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6201                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6202                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6203                 </fields>
6204                 <links>
6205                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6206                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6207                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6208                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6209                 </links>
6210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6211                         <actions>
6212                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6213                                 <retrieve/>
6214                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6215                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6216                         </actions>
6217                 </permacrud>
6218         </class>
6219         <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">
6220                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6221                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6222                         <field name="btype" reporter:datatype="text"/>
6223                         <field name="id" reporter:datatype="id" />
6224                         <field name="name"  reporter:datatype="text"/>
6225                         <field name="description" reporter:datatype="text"/>
6226                         <field name="owner" reporter:datatype="link"/>
6227                         <field name="pub" reporter:datatype="bool"/>
6228                         <field name="create_time" reporter:datatype="timestamp" />
6229                 </fields>
6230                 <links>
6231                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6232                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6233                 </links>
6234         </class>
6235         <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">
6236                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6237                         <field name="id" reporter:datatype="id" />
6238                         <field name="bucket" reporter:datatype="link"/>
6239                         <field name="note" reporter:datatype="text" />
6240                 </fields>
6241                 <links>
6242                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6243                 </links>
6244         </class>
6245         <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">
6246                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6247                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6248                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6249                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6250                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6251                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6252                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6253                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6254                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6255                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6256                 </fields>
6257                 <links>
6258                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6259                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6260                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6261                 </links>
6262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6263                         <actions>
6264                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6265                         </actions>
6266                 </permacrud>
6267         </class>
6268         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6269                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6270                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6271                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6272                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6273                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6274                 </fields>
6275                 <links>
6276                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6277                 </links>
6278                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6279                         <actions>
6280                                 <retrieve permission="VIEW_USER">
6281                                         <context link="usr" field="home_ou" />
6282                                 </retrieve>
6283                         </actions>
6284                 </permacrud>
6285         </class>
6286     <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">
6287         <fields oils_persist:primary="field">
6288             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6289             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6290             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6291         </fields>
6292         <links/>
6293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6294             <actions>
6295                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6296                 <retrieve />
6297                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6298                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6299             </actions>
6300         </permacrud>
6301     </class>
6302         <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">
6303                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6304                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6305                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6306                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6307                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6308                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6309                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6310                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6311                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6312                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6313                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6314                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6315                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6316                 </fields>
6317                 <links>
6318                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6319                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6320                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6321                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6322                 </links>
6323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6324             <actions>
6325                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6326                 <retrieve />
6327                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6328                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6329             </actions>
6330         </permacrud>
6331         </class>
6332         <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">
6333                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6334                         <field name="field" reporter:datatype="link"/>
6335                         <field name="id" reporter:datatype="id" />
6336                         <field name="source" reporter:datatype="link"/>
6337                         <field name="value"  reporter:datatype="text"/>
6338                 </fields>
6339                 <links>
6340                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6341                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6342                 </links>
6343         </class>
6344         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6345                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6346                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6347                         <field name="btype" reporter:datatype="text"/>
6348                         <field name="id" reporter:datatype="id" />
6349                         <field name="name"  reporter:datatype="text"/>
6350                         <field name="description" reporter:datatype="text"/>
6351                         <field name="owner" reporter:datatype="link"/>
6352                         <field name="pub" reporter:datatype="bool"/>
6353                         <field name="create_time" reporter:datatype="timestamp" />
6354                 </fields>
6355                 <links>
6356                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6357                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6358                 </links>
6359         </class>
6360         <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">
6361                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6362                         <field name="id" reporter:datatype="id" />
6363                         <field name="bucket" reporter:datatype="link"/>
6364                         <field name="note" reporter:datatype="text" />
6365                 </fields>
6366                 <links>
6367                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6368                 </links>
6369         </class>
6370         <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">
6371                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6372                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6373                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6374                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6375                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6376                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6377                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6378                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6379                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6380                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6381                 </fields>
6382                 <links>
6383                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6384                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6385                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6386                 </links>
6387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6388             <actions>
6389                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6390                     <context link="xact" jump="usr" field="home_ou"/>
6391                 </retrieve>
6392                         </actions>
6393                 </permacrud>
6394         </class>
6395         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6396                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6397                         <field name="id" reporter:datatype="id" />
6398                         <field name="ind1" />
6399                         <field name="ind2" />
6400                         <field name="record" />
6401                         <field name="subfield" />
6402                         <field name="tag" />
6403                         <field name="value" />
6404                 </fields>
6405                 <links>
6406                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6407                 </links>
6408         </class>
6409         <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">
6410                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6411                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6412                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6413                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6414                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6415                 </fields>
6416                 <links>
6417                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6418                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6419                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6420                 </links>
6421         </class>
6422         <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">
6423                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6424                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6425                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6426                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6427                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6428                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6429                 </fields>
6430                 <links>
6431                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6432                 </links>
6433         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6434             <actions>
6435                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6436                 <retrieve/>
6437                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6438                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6439             </actions>
6440         </permacrud>
6441
6442         </class>
6443         <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">
6444                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6445                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6446                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6447                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6448                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6449                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6450                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6451                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6452                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6453                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6454                 </fields>
6455                 <links>
6456                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6457                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6458                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6459                 </links>
6460         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6461             <actions>
6462                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6463                 <retrieve/>
6464                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6465                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6466             </actions>
6467         </permacrud>
6468         </class>
6469         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6470                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6471                         <field name="create_date" reporter:datatype="timestamp"/>
6472                         <field name="creator" reporter:datatype="link"/>
6473                         <field name="edit_date" reporter:datatype="timestamp"/>
6474                         <field name="editor" reporter:datatype="link"/>
6475                         <field name="id" reporter:datatype="id" />
6476                         <field name="pub" reporter:datatype="bool"/>
6477                         <field name="record" reporter:datatype="link"/>
6478                         <field name="value"  reporter:datatype="text"/>
6479                 </fields>
6480                 <links>
6481                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6482                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6483                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6484                 </links>
6485         </class>
6486         <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">
6487                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6488                         <field name="balance_owed" reporter:datatype="money" />
6489                         <field name="total_owed" reporter:datatype="money" />
6490                         <field name="total_paid" reporter:datatype="money" />
6491                         <field name="usr" reporter:datatype="link"/>
6492                 </fields>
6493                 <links>
6494                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6495                 </links>
6496         </class>
6497         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6498                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6499                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6500                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6501                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6502                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6503                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6504                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6505                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6506                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6507                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6508                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6509                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6510                 </fields>
6511                 <links>
6512                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6513                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6514                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6515                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6516                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6517                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6518                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6519                 </links>
6520         </class>
6521         <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">
6522                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6523                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6524                         <field name="quality" reporter:datatype="int" />
6525                         <field name="source" reporter:datatype="text"/>
6526                         <field name="transcendant" reporter:datatype="bool"/>
6527                         <field name="can_have_copies" reporter:datatype="bool"/>
6528                 </fields>
6529                 <links/>
6530         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6531             <actions>
6532                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6533                 <retrieve/>
6534                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6535                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6536             </actions>
6537         </permacrud>
6538         </class>
6539         <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">
6540                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6541                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6542                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6543                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6544                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6545                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6546                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6547                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6548                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6549                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6550                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6551                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6552                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6553                 </fields>
6554                 <links>
6555                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6556                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6557                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6558                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6559                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6560                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6561                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6562                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6563                 </links>
6564                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6565                         <actions>
6566                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6567                                         <context link="usr" field="home_ou" />
6568                                 </retrieve>
6569                         </actions>
6570                 </permacrud>
6571         </class>
6572         <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">
6573                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6574                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6575                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6576                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6577                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6578                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6579                 </fields>
6580                 <links>
6581                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6582                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6583                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6584                 </links>
6585         </class>
6586         <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">
6587                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6588                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6589                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6590                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6591                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6592                 </fields>
6593                 <links>
6594                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6595                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6596                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6597                 </links>
6598         </class>
6599         <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">
6600                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6601                         <field name="bucket" reporter:datatype="link"/>
6602                         <field name="id" reporter:datatype="id" />
6603                         <field name="target_user" reporter:datatype="link"/>
6604                         <field name="create_time" reporter:datatype="timestamp" />
6605                         <field name="pos" reporter:datatype="int" />
6606                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6607                 </fields>
6608                 <links>
6609                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6610                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6611             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6612                 </links>
6613         </class>
6614         <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">
6615                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6616                         <field name="id" reporter:datatype="id" />
6617                         <field name="item" reporter:datatype="link"/>
6618                         <field name="note" reporter:datatype="text" />
6619                 </fields>
6620                 <links>
6621                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6622                 </links>
6623         </class>
6624         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6625                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6626                         <field name="balance_owed" reporter:datatype="money" />
6627                         <field name="total_owed" reporter:datatype="money" />
6628                         <field name="total_paid" reporter:datatype="money" />
6629                         <field name="usr" reporter:datatype="link"/>
6630                 </fields>
6631                 <links>
6632                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6633                 </links>
6634         </class>
6635         <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">
6636                 <fields oils_persist:primary="code" oils_persist:sequence="">
6637                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6638                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6639                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6640                 </fields>
6641                 <links/>
6642         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6643             <actions>
6644                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6645                 <retrieve/>
6646                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6647                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6648             </actions>
6649         </permacrud>
6650         </class>
6651         <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">
6652                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6653                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6654                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6655                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6656                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6657                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6658                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6659                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6660                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6661                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6662                 </fields>
6663                 <links>
6664                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6665                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6666                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6667                 </links>
6668         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6669             <actions>
6670                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6671                     <context link="xact" jump="usr" field="home_ou"/>
6672                 </retrieve>
6673                         </actions>
6674                 </permacrud>
6675         </class>
6676         <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">
6677                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6678                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6679                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6680                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6681                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6682                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6683                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6684                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6685                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6686                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6687                 </fields>
6688                 <links>
6689                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6690                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6691                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6692                 </links>
6693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6694             <actions>
6695                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6696                     <context link="xact" jump="usr" field="home_ou"/>
6697                 </retrieve>
6698                         </actions>
6699                 </permacrud>
6700         </class>
6701         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6702                 <fields oils_persist:primary="id" oils_persist:sequence="">
6703                         <field name="checkin_lib" reporter:datatype="link"/>
6704                         <field name="checkin_staff" reporter:datatype="link"/>
6705                         <field name="checkin_time" reporter:datatype="timestamp"/>
6706                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6707                         <field name="circ_staff" reporter:datatype="link"/>
6708                         <field name="desk_renewal" reporter:datatype="bool"/>
6709                         <field name="due_date" reporter:datatype="timestamp"/>
6710                         <field name="duration" reporter:datatype="interval"/>
6711                         <field name="duration_rule" reporter:datatype="link"/>
6712                         <field name="fine_interval" reporter:datatype="interval"/>
6713                         <field name="id" reporter:datatype="id" />
6714                         <field name="max_fine" reporter:datatype="money" />
6715                         <field name="max_fine_rule" reporter:datatype="link"/>
6716                         <field name="opac_renewal" reporter:datatype="bool"/>
6717                         <field name="phone_renewal" reporter:datatype="bool"/>
6718                         <field name="recurring_fine" reporter:datatype="money" />
6719                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6720                         <field name="renewal_remaining" reporter:datatype="int" />
6721             <field name="grace_period" reporter:datatype="interval" />
6722                         <field name="stop_fines" reporter:datatype="text"/>
6723                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6724                         <field name="target_copy" reporter:datatype="link"/>
6725                         <field name="usr" reporter:datatype="link"/>
6726                         <field name="xact_finish" reporter:datatype="timestamp" />
6727                         <field name="xact_start" reporter:datatype="timestamp" />
6728                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6729                 </fields>
6730                 <links>
6731                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6732                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6733                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6734                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6735                 </links>
6736         </class>
6737         <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">
6738                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6739                         <field name="field" reporter:datatype="link"/>
6740                         <field name="id" reporter:datatype="id" />
6741                         <field name="source" reporter:datatype="link"/>
6742                         <field name="value" reporter:datatype="text"/>
6743                 </fields>
6744                 <links>
6745                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6746                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6747                 </links>
6748         </class>
6749         <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">
6750                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6751                         <field name="high" reporter:datatype="money" />
6752                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6753                         <field name="low" reporter:datatype="money" />
6754                         <field name="name" reporter:datatype="text"/>
6755                         <field name="normal" reporter:datatype="money" />
6756                         <field name="recurrence_interval" reporter:datatype="interval"/>
6757             <field name="grace_period" reporter:datatype="interval" />
6758                 </fields>
6759                 <links/>
6760         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6761             <actions>
6762                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6763                 <retrieve/>
6764                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6765                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6766             </actions>
6767         </permacrud>
6768         </class>
6769         <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">
6770                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6771                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6772                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6773                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6774                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6775                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6776                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6777                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6778                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6779                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6780                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6781                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6782                 </fields>
6783                 <links>
6784                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6785                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6786                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6787                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6788                 </links>
6789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6790             <actions>
6791                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6792                     <context link="xact" jump="usr" field="home_ou"/>
6793                 </retrieve>
6794                         </actions>
6795                 </permacrud>
6796         </class>
6797         <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">
6798                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6799                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6800                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6801                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6802                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6803                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6804                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6805                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6806                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6807                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6808                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6809                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6810                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6811                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6812                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6813                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6814                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6815                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6816                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6817                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6818                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6819                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6820                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6821                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6822                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6823                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6824                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6825                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6826                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6827                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6828                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6829                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6830                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6831                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6832                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6833                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6834                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6835                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6836                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6837                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6838                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6839                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6840                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6841                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6842                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6843                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6844                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6845                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6846                 </fields>
6847                 <links>
6848                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6849                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6850                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6851                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6852                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6853                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6854                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6855                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6856                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6857                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6858                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6859                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6860                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6861                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6862                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6863                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6864                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6865                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6866                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6867                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6868                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6869                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6870                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
6871                 </links>
6872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6873             <actions>
6874                 <create permission="CREATE_COPY">
6875                     <context link="call_number" field="owning_lib"/>
6876                 </create>
6877                 <retrieve/>
6878                 <update permission="UPDATE_COPY">
6879                     <context link="call_number" field="owning_lib"/>
6880                 </update>
6881                 <delete permission="DELETE_COPY">
6882                     <context link="call_number" field="owning_lib"/>
6883                 </delete>
6884             </actions>
6885         </permacrud>
6886         </class>
6887
6888         <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">
6889                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6890                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6891                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6892                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6893                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6894                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6895                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6896                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6897                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6898                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6899                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6900                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6901                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6902                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6903                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6904                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6905                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6906                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6907                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6908                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6909                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6910                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6911                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6912                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6913                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6914                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6915                 </fields>
6916                 <links>
6917                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6918                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6919                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6920                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6921                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6922                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6923                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6924                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6925                 </links>
6926                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6927                         <actions>
6928                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6929                                 <retrieve />
6930                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6931                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6932                         </actions>
6933                 </permacrud>
6934         </class>
6935
6936         <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">
6937                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6938                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6939                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6940                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6941                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6942                 </fields>
6943                 <links/>
6944         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6945             <actions>
6946                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6947                 <retrieve/>
6948                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6949                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6950             </actions>
6951         </permacrud>
6952         </class>
6953         <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">
6954                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6955                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6956                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6957                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6958                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6959                 </fields>
6960                 <links/>
6961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6962             <actions>
6963                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6964                 <retrieve/>
6965                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6966                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6967             </actions>
6968         </permacrud>
6969         </class>
6970         <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">
6971                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6972                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6973                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6974                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6975                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6976                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6977                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6978                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6979                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6980                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6981                 </fields>
6982                 <links>
6983                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6984                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6985                 </links>
6986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6987             <actions>
6988                 <create permission="CREATE_PERM" global_required="true"/>
6989                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6990                 <update permission="UPDATE_PERM" global_required="true"/>
6991                 <delete permission="DELETE_PERM" global_required="true"/>
6992             </actions>
6993         </permacrud>
6994         </class>
6995         <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">
6996                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6997                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6998                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6999                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7000                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7001                 </fields>
7002                 <links>
7003                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7004                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7005                 </links>
7006         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7007             <actions>
7008                 <create permission="ADMIN_SURVEY">
7009                     <context link="question" jump="survey" field="owner"/>
7010                 </create>
7011                 <retrieve/>
7012                 <update permission="ADMIN_SURVEY">
7013                     <context link="question" jump="survey" field="owner"/>
7014                 </update>
7015                 <delete permission="ADMIN_SURVEY">
7016                     <context link="question" jump="survey" field="owner"/>
7017                 </delete>
7018             </actions>
7019         </permacrud>
7020         </class>
7021         <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">
7022                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7023                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7024                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7025                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7026                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7027                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7028                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7029                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7030                 </fields>
7031                 <links>
7032                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7033                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7034                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7035                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7036                 </links>
7037                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7038                         <actions>
7039                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7040                         </actions>
7041                 </permacrud>
7042         </class>
7043         <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">
7044                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7045                         <field name="balance_owed" reporter:datatype="money" />
7046                         <field name="total_owed" reporter:datatype="money" />
7047                         <field name="total_paid" reporter:datatype="money" />
7048                         <field name="usr" reporter:datatype="link"/>
7049                 </fields>
7050                 <links>
7051                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7052                 </links>
7053         </class>
7054         <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">
7055                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7056                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7057                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7058                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7059                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7060                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7061                 </fields>
7062                 <links>
7063                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7064                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7065                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7066                 </links>
7067         </class>
7068         <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">
7069                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7070                         <field name="field" reporter:datatype="link"/>
7071                         <field name="id" reporter:datatype="id" />
7072                         <field name="source" reporter:datatype="link"/>
7073                         <field name="value" reporter:datatype="text"/>
7074                 </fields>
7075                 <links>
7076                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7077                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7078                 </links>
7079         </class>
7080         <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">
7081                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7082                         <field name="field" reporter:datatype="link"/>
7083                         <field name="id" reporter:datatype="id" />
7084                         <field name="source" reporter:datatype="link"/>
7085                         <field name="value" reporter:datatype="text"/>
7086                 </fields>
7087                 <links>
7088                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7089                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7090                 </links>
7091         </class>
7092         <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">
7093                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7094                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7095                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7096                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7097                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7098                 </fields>
7099                 <links>
7100                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7101                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7102                 </links>
7103         </class>
7104         <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">
7105                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7106                         <field name="depth" reporter:datatype="int" />
7107                         <field name="grantable" reporter:datatype="bool"/>
7108                         <field name="grp" reporter:datatype="link"/>
7109                         <field name="id" reporter:datatype="id" />
7110                         <field name="perm" reporter:datatype="link"/>
7111                 </fields>
7112                 <links>
7113                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7114                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7115                 </links>
7116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7117             <actions>
7118                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7119                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7120                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7121                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7122             </actions>
7123         </permacrud>
7124         </class>
7125         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7126                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7127                         <field name="items" oils_persist:virtual="true" />
7128                         <field name="btype" reporter:datatype="text"/>
7129                         <field name="id" reporter:datatype="id" />
7130                         <field name="name" reporter:datatype="text"/>
7131                         <field name="description" reporter:datatype="text"/>
7132                         <field name="owner" reporter:datatype="link"/>
7133                         <field name="pub" reporter:datatype="bool"/>
7134                         <field name="create_time" reporter:datatype="timestamp" />
7135                 </fields>
7136                 <links>
7137                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7138                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7139                 </links>
7140         </class>
7141         <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">
7142                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7143                         <field name="id" reporter:datatype="id" />
7144                         <field name="bucket" reporter:datatype="link"/>
7145                         <field name="note" reporter:datatype="text" />
7146                 </fields>
7147                 <links>
7148                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7149                 </links>
7150         </class>
7151         <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">
7152                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7153                         <field name="id" reporter:datatype="int" />
7154                         <field name="usr" reporter:datatype="link"/>
7155                         <field name="work_ou" reporter:datatype="link"/>
7156                 </fields>
7157                 <links>
7158                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7159                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7160                 </links>
7161         </class>
7162         <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">
7163                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7164                         <field name="depth" reporter:datatype="int"/>
7165                         <field name="grantable" reporter:datatype="bool"/>
7166                         <field name="id" reporter:datatype="id" />
7167                         <field name="perm" reporter:datatype="link"/>
7168                         <field name="usr" reporter:datatype="link"/>
7169                 </fields>
7170                 <links>
7171                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7172                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7173                 </links>
7174         </class>
7175         <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">
7176                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7177                         <field name="object_id" reporter:datatype="text"/>
7178                         <field name="grantable" reporter:datatype="bool"/>
7179                         <field name="id" reporter:datatype="id" />
7180                         <field name="perm" reporter:datatype="link"/>
7181                         <field name="usr" reporter:datatype="link"/>
7182                         <field name="object_type" reporter:datatype="text"/>
7183                 </fields>
7184                 <links>
7185                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7186                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7187                 </links>
7188         </class>
7189         <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">
7190                 <fields oils_persist:primary="id" oils_persist:sequence="">
7191                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7192                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7193                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7194                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7195                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7196                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7197                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7198                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7199                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7200                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7201                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7202                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7203                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7204                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7205                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7206                 </fields>
7207                 <links>
7208                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7209                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7210                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7211                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7212                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7213                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7214                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7215                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7216                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7217                 </links>
7218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7219             <actions>
7220                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7221                     <context link="xact" jump="usr" field="home_ou"/>
7222                 </retrieve>
7223                         </actions>
7224                 </permacrud>
7225         </class>
7226         <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">
7227                 <fields oils_persist:primary="id" oils_persist:sequence="">
7228                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7229                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7230                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7231                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7232                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7233                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7234                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7235                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7236                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7237                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7238                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7239                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7240                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7241                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7242                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7243                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7244                 </fields>
7245                 <links>
7246                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7247                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7248                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7249                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7250                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7251                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7252                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7253                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7254                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7255                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7256                 </links>
7257         </class>
7258         <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">
7259                 <fields oils_persist:primary="id" oils_persist:sequence="">
7260                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7261                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7262                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7263                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7264                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7265                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7266                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7267                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7268                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7269                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7270                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7271                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7272                 </fields>
7273                 <links>
7274                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7275                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7276                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7277                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7278                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7279                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7280                 </links>
7281         </class>
7282         <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">
7283                 <fields oils_persist:primary="id" oils_persist:sequence="">
7284                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7285                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7286                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7287                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7288                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7289                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7290                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7291                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7292                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7293                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7294                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7295                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7296                 </fields>
7297                 <links>
7298                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7299                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7300                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7301                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7302                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7303                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7304                 </links>
7305         </class>
7306         <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">
7307                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7308                         <field name="bucket" reporter:datatype="link"/>
7309                         <field name="id" reporter:datatype="id" />
7310                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7311                         <field name="create_time" reporter:datatype="timestamp" />
7312                         <field name="pos" reporter:datatype="int" />
7313                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7314                 </fields>
7315                 <links>
7316                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7317                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7318             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7319                 </links>
7320         </class>
7321         <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">
7322                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7323                         <field name="id" reporter:datatype="id" />
7324                         <field name="item" reporter:datatype="link"/>
7325                         <field name="note" reporter:datatype="text" />
7326                 </fields>
7327                 <links>
7328                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7329                 </links>
7330         </class>
7331         <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">
7332                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7333                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7334                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7335                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7336                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7337                 </fields>
7338                 <links>
7339                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7340                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7341                 </links>
7342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7343                         <actions>
7344                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7345                         </actions>
7346                 </permacrud>
7347         </class>
7348     <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">
7349         <fields oils_persist:primary="field">
7350             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7351             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7352             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7353         </fields>
7354         <links/>
7355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7356             <actions>
7357                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7358                 <retrieve />
7359                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7360                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7361             </actions>
7362         </permacrud>
7363     </class>
7364         <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">
7365                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7366                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7367                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7368                 </fields>
7369                 <links/>
7370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7371             <actions>
7372                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7373                 <retrieve/>
7374                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7375                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7376             </actions>
7377         </permacrud>
7378         </class>
7379
7380
7381         <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">
7382                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7383                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7384                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7385                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7386                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7387                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7388                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7389                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7390                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7391                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7392                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7393                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7394                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7395                 </fields>
7396                 <links>
7397                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7398                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7399                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7400                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7401                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7402                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7403                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7404                 </links>
7405         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7406             <actions>
7407                 <create permission="TRANSIT_COPY">
7408                     <context link="target_copy" field="owner"/>
7409                 </create>
7410                 <retrieve/>
7411                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7412                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7413             </actions>
7414         </permacrud>
7415         </class>
7416         <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">
7417                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7418                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7419                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7420                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7421                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7422                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7423                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7424                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7425                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7426                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7427                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7428                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7429                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7430                 </fields>
7431                 <links>
7432                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7433                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7434                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7435                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7436                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7437                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7438                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7439                 </links>
7440         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7441             <actions>
7442                 <create permission="TRANSIT_COPY" context_field="owner">
7443                     <context link="target_copy" field="circ_lib"/>
7444                 </create>
7445                 <retrieve/>
7446                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7447                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7448             </actions>
7449         </permacrud>
7450         </class>
7451         <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">
7452                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7453                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7454                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7455                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7456                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7457                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7458                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7459                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7460                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7461                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7462                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7463                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7464                 </fields>
7465                 <links>
7466                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7467                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7468                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7469                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7470                 </links>
7471         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7472             <actions>
7473                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7474                     <context link="xact" jump="usr" field="home_ou"/>
7475                 </retrieve>
7476                         </actions>
7477                 </permacrud>
7478         </class>
7479         <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">
7480                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7481                         <field name="grp" />
7482                         <field name="id" reporter:datatype="id" />
7483                         <field name="usr" />
7484                 </fields>
7485                 <links>
7486                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7487                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7488                 </links>
7489         </class>
7490         <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">
7491                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7492                         <field name="id" reporter:datatype="id" />
7493                         <field name="fq_field" reporter:datatype="text"/>
7494                         <field name="identity_value" reporter:datatype="text"/>
7495                         <field name="translation" reporter:datatype="text"/>
7496                         <field name="string" reporter:datatype="text"/>
7497                 </fields>
7498                 <links>
7499                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7500                 </links>
7501         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7502             <actions>
7503                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7504                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7505                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7506                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7507             </actions>
7508         </permacrud>
7509         </class>
7510         <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">
7511                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7512                         <field name="id" reporter:datatype="id" />
7513                         <field name="fm_class" reporter:datatype="text"/>
7514                         <field name="field" reporter:datatype="text"/>
7515                         <field name="owner" reporter:datatype="org_unit"/>
7516                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7517                 </fields>
7518                 <links>
7519                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7520                 </links>
7521         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7522             <actions>
7523                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7524                 <retrieve/>
7525                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7526                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7527             </actions>
7528         </permacrud>
7529         </class>
7530         <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">
7531                 <fields oils_persist:primary="code">
7532                         <field name="code" reporter:datatype="id" />
7533                         <field name="marc_code" reporter:datatype="text"/>
7534                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7535                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7536                         <field name="rtl" reporter:datatype="bool"/>
7537                 </fields>
7538                 <links/>
7539         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7540             <actions>
7541                 <create permission="CREATE_LOCALE" global_required="true"/>
7542                 <retrieve/>
7543                 <update permission="UPDATE_LOCALE" global_required="true"/>
7544                 <delete permission="DELETE_LOCALE" global_required="true"/>
7545             </actions>
7546         </permacrud>
7547         </class>
7548         <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">
7549                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7550                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7551                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7552                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7553             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7554                 </fields>
7555                 <links>
7556                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7557                 </links>
7558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7559             <actions>
7560                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7561                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7562                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7563                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7564             </actions>
7565         </permacrud>
7566         </class>
7567
7568         <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">
7569                 <fields oils_persist:primary="id">
7570                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7571                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7572                 </fields>
7573                 <links/>
7574         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7575             <actions>
7576                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7577                 <retrieve/>
7578                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7579                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7580             </actions>
7581         </permacrud>
7582         </class>
7583
7584         <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">
7585                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7586                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7587                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7588                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7589                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7590                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7591                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7592                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7593                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7594                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7595                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7596                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7597                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7598                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7599                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7600                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7601                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7602                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7603                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7604                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7605                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7606                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7607                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7608                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7609                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7610                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7611                 </fields>
7612                 <links>
7613                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7614                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7615                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7616                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7617                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7618                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7619                 </links>
7620         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7621             <actions>
7622                 <create permission="user_request.create">
7623                     <context link="usr" field="home_ou"/>
7624                                 </create>
7625                 <retrieve permission="user_request.view">
7626                     <context link="usr" field="home_ou"/>
7627                                 </retrieve>
7628                 <update permission="user_request.update">
7629                     <context link="usr" field="home_ou"/>
7630                                 </update>
7631                 <delete permission="user_request.delete">
7632                     <context link="usr" field="home_ou"/>
7633                                 </delete>
7634             </actions>
7635         </permacrud>
7636         </class>
7637
7638         <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">
7639                 <fields oils_persist:primary="code">
7640                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7641                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7642                 </fields>
7643                 <links/>
7644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7645             <actions>
7646                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7647                 <retrieve/>
7648                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7649                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7650             </actions>
7651         </permacrud>
7652         </class>
7653
7654         <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">
7655                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7656                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7657                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7658                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7659                         <field reporter:label="Ratio" name="ratio" />
7660                 </fields>
7661                 <links>
7662                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7663                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7664                 </links>
7665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7666                         <actions>
7667                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7668                                 <retrieve/>
7669                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7670                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7671                         </actions>
7672                 </permacrud>
7673         </class>
7674
7675         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7676                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7677                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7678                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7679                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7680                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7681                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7682                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7683                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7684                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7685                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7686                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7687                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7688                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7689                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7690                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7691                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7692                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7693                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7694                 </fields>
7695                 <links>
7696                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7697                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7698             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7699             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7700             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7701                 </links>
7702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7703             <actions>
7704                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7705                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7706                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7707                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7708             </actions>
7709         </permacrud>
7710         </class>
7711
7712         <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">
7713                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7714                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7715                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7716                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7717                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7718                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7719                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7720                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7721                 </fields>
7722                 <links>
7723                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7724                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7725                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7726                 </links>
7727         </class>
7728
7729         <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">
7730                 <fields oils_persist:primary="code">
7731                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7732                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7733                 </fields>
7734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7735             <actions>
7736                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7737                 <retrieve/>
7738                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7739                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7740             </actions>
7741                 </permacrud>
7742         </class>
7743
7744         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7745                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7746                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7747                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7748                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7749                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7750                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7751                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7752                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7753                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7754                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7755                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7756                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7757                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7758                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7759                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7760                 </fields>
7761                 <links>
7762                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7763                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7764                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7765                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7766                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7767                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7768                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7769                 </links>
7770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7771             <actions>
7772                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7773                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7774                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7775                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7776             </actions>
7777         </permacrud>
7778         </class>
7779
7780         <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">
7781                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7782                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7783                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7784                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7785                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7786                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7787                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7788                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7789                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7790                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7791                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7792                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7793                 </fields>
7794                 <links>
7795                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7796                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7797                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7798                 </links>
7799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7800             <actions>
7801                 <create   permission="ADMIN_INVOICE">
7802                                         <context link="invoice" field="receiver"/>
7803                                 </create>
7804                 <retrieve permission="ADMIN_INVOICE">
7805                                         <context link="invoice" field="receiver"/>
7806                                 </retrieve>
7807                 <update   permission="ADMIN_INVOICE">
7808                                         <context link="invoice" field="receiver"/>
7809                                 </update>
7810                                 <delete   permission="ADMIN_INVOICE">
7811                                         <context link="invoice" field="receiver"/>
7812                                 </delete>
7813             </actions>
7814         </permacrud>
7815         </class>
7816
7817         <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">
7818                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7819                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7820                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7821                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7822                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7823                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7824                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7825                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7826                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7827                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7828                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7829                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7830                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7831                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7832                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7833                 </fields>
7834                 <links>
7835                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7836                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7837                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7838                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7839                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7840                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7841                 </links>
7842         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7843             <actions>
7844                 <create   permission="ADMIN_INVOICE">
7845                                         <context link="invoice" field="receiver"/>
7846                                 </create>
7847                 <retrieve permission="ADMIN_INVOICE">
7848                                         <context link="invoice" field="receiver"/>
7849                                 </retrieve>
7850                 <update   permission="ADMIN_INVOICE">
7851                                         <context link="invoice" field="receiver"/>
7852                                 </update>
7853                                 <delete   permission="ADMIN_INVOICE">
7854                                         <context link="invoice" field="receiver"/>
7855                                 </delete>
7856             </actions>
7857         </permacrud>
7858         </class>
7859
7860         <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">
7861                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7862                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7863                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7864                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7865                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7866                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7867                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7868                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7869                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7870                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7871                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7872                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7873                         <field reporter:label="Fax Phone" name="fax_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
7896         <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">
7897                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7898                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7899                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7900                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7901                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7902                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7903                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7904         </fields>
7905                 <links>
7906                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7907                 </links>
7908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7909             <actions>
7910                 <create permission="ADMIN_PROVIDER">
7911                     <context link="provider" field="owner"/>
7912                 </create>
7913                 <retrieve permission="ADMIN_PROVIDER">
7914                     <context link="provider" field="owner"/>
7915                 </retrieve>
7916                 <update permission="ADMIN_PROVIDER">
7917                     <context link="provider" field="owner"/>
7918                 </update>
7919                 <delete permission="ADMIN_PROVIDER">
7920                     <context link="provider" field="owner"/>
7921                 </delete>
7922             </actions>
7923         </permacrud>
7924     </class>
7925         <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">
7926                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7927                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7928                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7929                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7930                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7931                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7932                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7933                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7934                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7935                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7936                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7937                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7938                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7939                 </fields>
7940                 <links>
7941                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7942                 </links>
7943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7944             <actions>
7945                 <create permission="ADMIN_PROVIDER">
7946                     <context link="contact" jump='provider' field="owner"/>
7947                 </create>
7948                 <retrieve permission="ADMIN_PROVIDER">
7949                     <context link="contact" jump='provider' field="owner"/>
7950                 </retrieve>
7951                 <update permission="ADMIN_PROVIDER">
7952                     <context link="contact" jump='provider' field="owner"/>
7953                 </update>
7954                 <delete permission="ADMIN_PROVIDER">
7955                     <context link="contact" jump='provider' field="owner"/>
7956                 </delete>
7957             </actions>
7958         </permacrud>
7959         </class>
7960
7961         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7962                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7963                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7964                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7965                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7966                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7967                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7968                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7969                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7970                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7971                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7972                 </fields>
7973                 <links>
7974                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7975                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7976                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7977                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7978                 </links>
7979         </class>
7980
7981         <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">
7982                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7983                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7984                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7985                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7986                 </fields>
7987                 <links>
7988             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7989                 </links>
7990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7991                         <actions>
7992                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7993                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7994                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7995                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7996                         </actions>
7997                 </permacrud>
7998         </class>
7999
8000         <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">
8001                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8002                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8003                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8004                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8005                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8006                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8007                 </fields>
8008                 <links>
8009                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8010                 </links>
8011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8012                         <actions>
8013                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8014                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8015                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8016                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8017                         </actions>
8018                 </permacrud>
8019         </class>
8020
8021         <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">
8022                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8023                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8024                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8025                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8026                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8027                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8028                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8029                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8030                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8031                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8032                 </fields>
8033                 <links>
8034                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8035                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8036             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8037             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8038                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8039                 </links>
8040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8041             <actions>
8042                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8043                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8044                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8045                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8046             </actions>
8047         </permacrud>
8048         </class>
8049
8050         <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">
8051                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8052                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8053                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8054                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8055                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8056                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8057                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8058                 </fields>
8059                 <links>
8060                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8061                 </links>
8062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8063                         <actions>
8064                                 <create permission="ADMIN_FUNDING_SOURCE">
8065                     <context link="funding_source" field="owner"/>
8066                 </create>
8067                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8068                     <context link="funding_source" field="owner"/>
8069                 </retrieve>
8070                                 <update permission="ADMIN_FUNDING_SOURCE">
8071                     <context link="funding_source" field="owner"/>
8072                 </update>
8073                                 <delete permission="ADMIN_FUNDING_SOURCE">
8074                     <context link="funding_source" field="owner"/>
8075                 </delete>
8076                         </actions>
8077                 </permacrud>
8078         </class>
8079
8080         <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">
8081                 <fields oils_persist:primary="id">
8082                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8083                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8084                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8085                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8086                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8087                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8088                 </fields>
8089                 <links>
8090                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8091                 </links>
8092         </class>
8093
8094         <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">
8095                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8096                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8097                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8098                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8099                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8100                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8101                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8102                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8103                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8104                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8105                 </fields>
8106                 <links>
8107                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8108                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8109                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8110                 </links>
8111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8112                         <actions>
8113                                 <create permission="ADMIN_ACQ_FUND">
8114                     <context link="fund" field="org"/>
8115                 </create>
8116                                 <retrieve permission="ADMIN_ACQ_FUND">
8117                     <context link="fund" field="org"/>
8118                 </retrieve>
8119                                 <update permission="ADMIN_ACQ_FUND">
8120                     <context link="fund" field="org"/>
8121                 </update>
8122                                 <delete permission="ADMIN_ACQ_FUND">
8123                     <context link="fund" field="org"/>
8124                 </delete>
8125                         </actions>
8126                 </permacrud>
8127         </class>
8128
8129         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8130                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8131                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8132                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8133                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8134                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8135                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8136                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8137                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8138                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8139                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8140                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8141                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8142                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8143                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8144                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8145                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8146                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8147                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8148                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8149                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8150                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8151                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8152                 </fields>
8153                 <links>
8154                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8155                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8156             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8157             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8158             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8159             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8160             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8161             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8162             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8163             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8164             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8165                 </links>
8166         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8167             <actions>
8168                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8169                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8170                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8171                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8172             </actions>
8173         </permacrud>
8174         </class>
8175
8176         <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">
8177                 <fields oils_persist:primary="fund">
8178                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8179                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8180                 </fields>
8181                 <links>
8182                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8183                 </links>
8184         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8185             <actions>
8186                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8187                                         <context link="fund" field="org" />
8188                 </retrieve>
8189             </actions>
8190         </permacrud>
8191         </class>
8192
8193         <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">
8194                 <fields oils_persist:primary="fund">
8195                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8196                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8197                 </fields>
8198                 <links>
8199                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8200                 </links>
8201         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8202             <actions>
8203                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8204                                         <context link="fund" field="org" />
8205                 </retrieve>
8206             </actions>
8207         </permacrud>
8208         </class>
8209
8210         <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">
8211                 <fields oils_persist:primary="fund">
8212                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8213                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8214                 </fields>
8215                 <links>
8216                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8217                 </links>
8218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8219             <actions>
8220                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8221                                         <context link="fund" field="org" />
8222                 </retrieve>
8223             </actions>
8224         </permacrud>
8225         </class>
8226
8227         <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">
8228                 <fields oils_persist:primary="fund">
8229                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8230                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8231                 </fields>
8232                 <links>
8233                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8234                 </links>
8235         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8236             <actions>
8237                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8238                                         <context link="fund" field="org" />
8239                 </retrieve>
8240             </actions>
8241         </permacrud>
8242         </class>
8243
8244         <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">
8245                 <fields oils_persist:primary="fund">
8246                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8247                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8248                 </fields>
8249                 <links>
8250                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8251                 </links>
8252         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8253             <actions>
8254                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8255                                         <context link="fund" field="org" />
8256                 </retrieve>
8257             </actions>
8258         </permacrud>
8259         </class>
8260
8261    <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">
8262         <fields oils_persist:primary="fund">
8263             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8264             <field reporter:label="Total Allocation Amount" 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="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">
8272         <fields oils_persist:primary="fund">
8273             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8274             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8275         </fields>
8276         <links>
8277             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8278         </links>
8279     </class>
8280
8281    <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">
8282         <fields oils_persist:primary="fund">
8283             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8284             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8285         </fields>
8286         <links>
8287             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8288         </links>
8289     </class>
8290
8291    <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">
8292         <fields oils_persist:primary="fund">
8293             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8294             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8295         </fields>
8296         <links>
8297             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8298         </links>
8299     </class>
8300
8301    <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">
8302         <fields oils_persist:primary="fund">
8303             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8304             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8305         </fields>
8306         <links>
8307             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8308         </links>
8309     </class>
8310
8311         <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">
8312                 <fields oils_persist:primary="funding_source">
8313                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8314                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8315                 </fields>
8316                 <links>
8317                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8318                 </links>
8319         </class>
8320
8321         <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">
8322                 <fields oils_persist:primary="funding_source">
8323                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8324                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8325                 </fields>
8326                 <links>
8327                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8328                 </links>
8329         </class>
8330
8331         <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">
8332                 <fields oils_persist:primary="funding_source">
8333                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8334                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8335                 </fields>
8336                 <links>
8337                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8338                 </links>
8339         </class>
8340
8341         <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">
8342                 <fields oils_persist:primary="fund">
8343                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8344                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8345                 </fields>
8346                 <links>
8347                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8348                 </links>
8349         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8350             <actions>
8351                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8352                                         <context link="fund" field="org" />
8353                 </retrieve>
8354             </actions>
8355         </permacrud>
8356     </class>
8357     <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">
8358         <oils_persist:source_definition><![CDATA[
8359             SELECT
8360                 acqf.*,
8361                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8362                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8363                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8364                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8365             FROM
8366                 acq.fund acqf
8367                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8368                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8369                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8370                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8371         ]]></oils_persist:source_definition>
8372         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8373             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8374             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8375             <field reporter:label="Name" name="name" reporter:datatype="text" />
8376             <field reporter:label="Year" name="year" reporter:datatype="int" />
8377             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8378             <field reporter:label="Code" name="code" reporter:datatype="text" />
8379             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8380             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8381             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8382             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8383             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8384
8385             <!-- non fund-native fields -->
8386             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8387             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8388             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8389             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8390         </fields>
8391         <links>
8392             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8393             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8394             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8395         </links>
8396         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8397             <actions>
8398                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8399             </actions>
8400         </permacrud>
8401         </class>
8402         <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">
8403                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8404                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8405                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8406                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8407                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8408                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8409                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8410                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8411                 </fields>
8412                 <links>
8413                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8414                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8415                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8416                 </links>
8417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8418                         <actions>
8419                                 <create permission="ADMIN_ACQ_FUND">
8420                     <context link="fund" field="org"/>
8421                 </create>
8422                                 <retrieve permission="ADMIN_ACQ_FUND">
8423                     <context link="fund" field="org"/>
8424                 </retrieve>
8425                                 <update permission="ADMIN_ACQ_FUND">
8426                     <context link="fund" field="org"/>
8427                 </update>
8428                                 <delete permission="ADMIN_ACQ_FUND">
8429                     <context link="fund" field="org"/>
8430                 </delete>
8431                         </actions>
8432                 </permacrud>
8433         </class>
8434
8435     <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">
8436         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8437             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8438             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8439             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8440             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8441             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8442             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8443             <field reporter:label="Note" name="note" reporter:datatype="text" />
8444             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8445         </fields>
8446         <links>
8447             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8448             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8449             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8450         </links>
8451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8452                         <actions>
8453                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8454                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8455                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8456                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8457                         </actions>
8458                 </permacrud>
8459     </class>
8460
8461         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8462                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8463                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8464                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8465                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8466                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8467                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8468                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8469                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8470                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8471                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8472                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8473                 </fields>
8474                 <links>
8475                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8476                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8477                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8478                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8479                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8480                 </links>
8481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8482                         <actions>
8483                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8484                         </actions>
8485                 </permacrud>
8486         </class>
8487
8488         <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">
8489                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8490                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8491                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8492                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8493                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8494                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8495                 </fields>
8496                 <links>
8497                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8498                 </links>
8499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8500                         <actions>
8501                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8502                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8503                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8504                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8505                         </actions>
8506                 </permacrud>
8507         </class>
8508
8509         <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">
8510                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8511                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8512                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8513                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8514                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8515                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8516                         <field reporter:label="State" name="state" reporter:datatype="text" />
8517                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8518                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8519                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8520                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8521                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8522                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8523                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8524                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8525                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8526                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8527                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8528                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8529                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8530                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8531                 </fields>
8532                 <links>
8533                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8534                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8535                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8536                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8537                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8538                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8539                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8540                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8541                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8542                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8543                 </links>
8544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8545                         <actions>
8546                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8547                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8548                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8549                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8550                         </actions>
8551                 </permacrud>
8552         </class>
8553
8554         <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">
8555                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8556                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8557                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8558                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8559                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8560                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8561                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8562                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8563                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8564                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8565                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8566                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8567                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8568                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8569                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8570                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8571                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8572                 </fields>
8573                 <links>
8574                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8575                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8576                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8577                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8578                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8579                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8580                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8581                 </links>
8582                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8583             <actions>
8584                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8585             </actions>
8586                 </permacrud>
8587         </class>
8588
8589         <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">
8590                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8591                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8592                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8593                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8594                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8595                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8596                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8597                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8598                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8599                 </fields>
8600                 <links>
8601                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8602                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8603                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8604                 </links>
8605                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8606             <actions>
8607                 <create permission="CREATE_PURCHASE_ORDER">
8608                     <context link="purchase_order" field="ordering_agency"/>
8609                 </create>
8610                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8611                     <context link="purchase_order" field="ordering_agency"/>
8612                 </retrieve>
8613                 <update permission="CREATE_PURCHASE_ORDER">
8614                     <context link="purchase_order" field="ordering_agency"/>
8615                 </update>
8616                 <delete permission="CREATE_PURCHASE_ORDER">
8617                     <context link="purchase_order" field="ordering_agency"/>
8618                 </delete>
8619             </actions>
8620                 </permacrud>
8621         </class>
8622
8623         <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">
8624                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8625                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8626                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8627                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8628                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8629                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8630                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8631                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8632                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8633                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8634                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8635                 </fields>
8636                 <links>
8637                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8638                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8639                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8640                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8641                 </links>
8642                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8643             <actions>
8644                 <create permission="CREATE_PURCHASE_ORDER">
8645                     <context link="purchase_order" field="ordering_agency"/>
8646                 </create>
8647                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8648                     <context link="purchase_order" field="ordering_agency"/>
8649                 </retrieve>
8650                 <update permission="CREATE_PURCHASE_ORDER">
8651                     <context link="purchase_order" field="ordering_agency"/>
8652                 </update>
8653                 <delete permission="CREATE_PURCHASE_ORDER">
8654                     <context link="purchase_order" field="ordering_agency"/>
8655                 </delete>
8656             </actions>
8657                 </permacrud>
8658         </class>
8659
8660         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8661                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8662                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8663                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8664                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8665                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8666                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8667                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8668                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8669                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8670                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8671                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8672                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8673                         <field reporter:label="State" name="state" reporter:datatype="text" />
8674                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8675                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8676                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8677                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8678                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8679                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8680                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8681                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8682                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8683                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8684                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8685                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8686                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8687                 </fields>
8688                 <links>
8689                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8690                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8691                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8692                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8693                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8694                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8695                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8696                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8697                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8698                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8699                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8700                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8701                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8702                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8703                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8704                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8705                 </links>
8706                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8707                         <actions>
8708                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8709                                         <context link="purchase_order" field="ordering_agency"/>
8710                                         <context link="picklist" field="org_unit"/>
8711                                 </retrieve>
8712                         </actions>
8713                 </permacrud>
8714         </class>
8715
8716         <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">
8717                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8718                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8719                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8720                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8721                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8722                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8723                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8724                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8725                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8726                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8727                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8728                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8729                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8730                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8731                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8732                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8733                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8734                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8735                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8736                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8737                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8738                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8739                 </fields>
8740                 <links>
8741                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8742                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8743                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8744                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8745                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8746                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8747                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8748                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8749                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8750                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8751                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8752                 </links>
8753                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8754                         <actions>
8755                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8756                                         <context link="purchase_order" field="ordering_agency"/>
8757                                         <context link="picklist" field="org_unit"/>
8758                                 </retrieve>
8759                         </actions>
8760                 </permacrud>
8761         </class>
8762
8763         <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">
8764                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8765                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8766                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8767                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8768                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8769                 </fields>
8770                 <links>
8771                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8772                 </links>
8773                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8774                         <actions>
8775                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8776                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8777                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8778                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8779                         </actions>
8780                 </permacrud>
8781         </class>
8782
8783         <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">
8784                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8785                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8786                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8787                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8788                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8789                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8790                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8791                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8792                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8793                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8794                 </fields>
8795                 <links>
8796                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8797                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8798                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8799                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8800                 </links>
8801         </class>
8802
8803         <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">
8804                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8805                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8806                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8807                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8808                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8809                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8810                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8811                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8812                 </fields>
8813                 <links>
8814                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8815                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8816                 </links>
8817         </class>
8818
8819         <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">
8820                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8821                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8822                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8823                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8824                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8825                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8826                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8827                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8828                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8829                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8830                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8831                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8832                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8833                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8834                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8835                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8836                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8837                 </fields>
8838                 <links>
8839                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8840                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8841                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8842                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8843                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8844                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8845                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8846                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8847                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8848                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8849                 </links>
8850         </class>
8851
8852         <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">
8853                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8854                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8855                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8856                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8857                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8858                 </fields>
8859                 <links/>
8860                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8861                         <actions>
8862                                 <retrieve />
8863                         </actions>
8864                 </permacrud>
8865         </class>
8866
8867         <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">
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="XPath" name="xpath" reporter:datatype="text" />
8873                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8874             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8875                 </fields>
8876                 <links/>
8877         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8878             <actions>
8879                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8880                 <retrieve />
8881                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8882                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8883             </actions>
8884         </permacrud>
8885         </class>
8886
8887         <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">
8888                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8889                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8890                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8891                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8892                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8893                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8894                 </fields>
8895                 <links/>
8896         </class>
8897         <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">
8898                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8899                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8900                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8901                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8902                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8903                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8904                 </fields>
8905                 <links>
8906                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8907                 </links>
8908         </class>
8909
8910         <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">
8911             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8912                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8913                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8914                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8915                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8916                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8917                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8918         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8919
8920             </fields>
8921             <links>
8922                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8923             </links>
8924             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8925                 <actions>
8926                     <create permission="ADMIN_PROVIDER">
8927                         <context link="provider" field="owner"/>
8928                     </create>
8929                     <retrieve permission="ADMIN_PROVIDER">
8930                         <context link="provider" field="owner"/>
8931                     </retrieve>
8932                     <update permission="ADMIN_PROVIDER">
8933                         <context link="provider" field="owner"/>
8934                     </update>
8935                     <delete permission="ADMIN_PROVIDER">
8936                         <context link="provider" field="owner"/>
8937                     </delete>
8938                 </actions>
8939             </permacrud>
8940         </class>
8941         
8942         <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">
8943             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8944                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8945                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8946                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8947                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8948             </fields>
8949             <links>
8950                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8951             </links>
8952             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8953                 <actions>
8954                     <create permission="ADMIN_PROVIDER">
8955                         <context link="provider" field="owner"/>
8956                     </create>
8957                     <retrieve permission="ADMIN_PROVIDER">
8958                         <context link="provider" field="owner"/>
8959                     </retrieve>
8960                     <update permission="ADMIN_PROVIDER">
8961                         <context link="provider" field="owner"/>
8962                     </update>
8963                     <delete permission="ADMIN_PROVIDER">
8964                         <context link="provider" field="owner"/>
8965                     </delete>
8966                 </actions>
8967             </permacrud>
8968         </class>
8969         
8970         <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">
8971             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8972                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8973                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8974                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8975                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8976                 </fields>
8977                 <links/>
8978         </class>
8979
8980         <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">
8981                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8982                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8983                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8984                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8985                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8986                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8987                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8988                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8989                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8990                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8991                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8992                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8993                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8994                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8995                 </fields>
8996                 <links>
8997                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8998                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8999                 </links>
9000         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9001             <actions>
9002                 <create permission="ADMIN_PROVIDER">
9003                     <context link="provider" field="owner"/>
9004                 </create>
9005                 <retrieve permission="ADMIN_PROVIDER">
9006                     <context link="provider" field="owner"/>
9007                 </retrieve>
9008                 <update permission="ADMIN_PROVIDER">
9009                     <context link="provider" field="owner"/>
9010                 </update>
9011                 <delete permission="ADMIN_PROVIDER">
9012                     <context link="provider" field="owner"/>
9013                 </delete>
9014             </actions>
9015         </permacrud>
9016         </class>
9017
9018         <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">
9019                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9020                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9021                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9022                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9023                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9024                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9025                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9026                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9027                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9028                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9029                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9030                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9031                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9032                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9033                 </fields>
9034                 <links>
9035                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9036                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9037                 </links>
9038         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9039             <actions>
9040                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9041                     <context link="account" jump="provider" field="owner"/>
9042                 </retrieve>
9043                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9044                     <context link="account" jump="provider" field="owner"/>
9045                 </update>
9046                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9047                     <context link="account" jump="provider" field="owner"/>
9048                 </delete>
9049             </actions>
9050         </permacrud>
9051         </class>
9052
9053
9054         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9055                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9056                         <field name="id" reporter:datatype="id" />
9057                         <field name="parent" reporter:datatype="link"/>
9058                         <field name="owner" reporter:datatype="link"/>
9059                         <field name="create_time" reporter:datatype="timestamp"/>
9060                         <field name="name" reporter:datatype="text"/>
9061                         <field name="shared" reporter:datatype="bool"/>
9062                         <field name="share_with" reporter:datatype="link"/>
9063                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9064                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9065                 </fields>
9066                 <links>
9067                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9068                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9069                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9070                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9071                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9072                 </links>
9073         </class>
9074         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9075                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9076                         <field name="id" reporter:datatype="id" />
9077                         <field name="parent" reporter:datatype="link"/>
9078                         <field name="owner" reporter:datatype="link"/>
9079                         <field name="create_time" reporter:datatype="timestamp"/>
9080                         <field name="name" reporter:datatype="text"/>
9081                         <field name="shared" reporter:datatype="bool"/>
9082                         <field name="share_with" reporter:datatype="link"/>
9083                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9084                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9085                 </fields>
9086                 <links>
9087                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9088                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9089                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9090                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9091                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9092                 </links>
9093         </class>
9094         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9095                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9096                         <field name="id" reporter:datatype="id" />
9097                         <field name="parent" reporter:datatype="link"/>
9098                         <field name="owner" reporter:datatype="link"/>
9099                         <field name="create_time" reporter:datatype="timestamp"/>
9100                         <field name="name" reporter:datatype="text"/>
9101                         <field name="shared" reporter:datatype="bool"/>
9102                         <field name="share_with" reporter:datatype="link"/>
9103                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9104                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9105                 </fields>
9106                 <links>
9107                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9108                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9109                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9110                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9111                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9112                 </links>
9113         </class>
9114         <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">
9115                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9116                         <field name="id" reporter:datatype="id" />
9117                         <field name="owner" reporter:datatype="link"/>
9118                         <field name="create_time" reporter:datatype="timestamp"/>
9119                         <field name="name" reporter:datatype="text"/>
9120                         <field name="data" reporter:datatype="text"/>
9121                         <field name="folder" reporter:datatype="link"/>
9122                         <field name="description" reporter:datatype="text"/>
9123                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9124                 </fields>
9125                 <links>
9126                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9127                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9128                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9129                 </links>
9130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9131             <actions>
9132                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9133                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9134                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9135                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9136             </actions>
9137         </permacrud>
9138         </class>
9139         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9140                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9141                         <field name="id" reporter:datatype="id" />
9142                         <field name="owner" reporter:datatype="link"/>
9143                         <field name="create_time" reporter:datatype="timestamp"/>
9144                         <field name="template" reporter:datatype="link"/>
9145                         <field name="data" reporter:datatype="text"/>
9146                         <field name="folder" reporter:datatype="link"/>
9147                         <field name="recur" reporter:datatype="bool"/>
9148                         <field name="recurrence" reporter:datatype="interval"/>
9149                         <field name="name" reporter:datatype="text"/>
9150                         <field name="description" reporter:datatype="text"/>
9151                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9152                 </fields>
9153                 <links>
9154                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9155                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9156                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9157                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9158                 </links>
9159         </class>
9160         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9161                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9162                         <field name="id" reporter:datatype="id" />
9163                         <field name="runner" reporter:datatype="link"/>
9164                         <field name="start_time" reporter:datatype="timestamp"/>
9165                         <field name="complete_time" reporter:datatype="timestamp"/>
9166                         <field name="run_time" reporter:datatype="timestamp"/>
9167                         <field name="email" reporter:datatype="text"/>
9168                         <field name="excel_format" reporter:datatype="bool"/>
9169                         <field name="csv_format" reporter:datatype="bool"/>
9170                         <field name="html_format" reporter:datatype="bool"/>
9171                         <field name="error_code" reporter:datatype="int"/>
9172                         <field name="error_text" reporter:datatype="text"/>
9173                         <field name="report" reporter:datatype="link"/>
9174                         <field name="folder" reporter:datatype="link"/>
9175                         <field name="chart_pie" reporter:datatype="bool"/>
9176                         <field name="chart_bar" reporter:datatype="bool"/>
9177                         <field name="chart_line" reporter:datatype="bool"/>
9178                 </fields>
9179                 <links>
9180                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9181                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9182                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9183                 </links>
9184         </class>
9185         <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">
9186                 <fields oils_persist:primary="id">
9187                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9188                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9189                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9190                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9191                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9192                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9193                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9194                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9195                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9196                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9197                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9198                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9199                 </fields>
9200                 <links>
9201                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9202                 </links>
9203                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9204                         <actions>
9205                                 <retrieve />
9206                         </actions>
9207                 </permacrud>
9208         </class>
9209         <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">
9210                 <fields oils_persist:primary="id">
9211                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9212                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9213                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9214                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9215                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9216                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9217                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9218                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9219                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9220                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9221                         <field reporter:label="ISSN" name="issn" 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="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9226                 </links>
9227         </class>
9228         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9229                 <fields oils_persist:primary="id">
9230                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9231                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9232                         <field reporter:label="Fingerprint" name="fingerprint" />
9233                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9234                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9235                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9236                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9237                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9238                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9239                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9240                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9241                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9242                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9243                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9244                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9245                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9246                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9247                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9248                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9249                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9250                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9251                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9252                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9253                 </fields>
9254                 <links>
9255                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9256                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9257                 </links>
9258         </class>
9259         <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">
9260                 <fields oils_persist:primary="id">
9261                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9262                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9263                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9264                 </fields>
9265                 <links>
9266                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9267                 </links>
9268         </class>
9269         <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">
9270                 <fields oils_persist:primary="id">
9271                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9272                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9273                 </fields>
9274                 <links>
9275                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9276                 </links>
9277         </class>
9278         <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">
9279                 <fields oils_persist:primary="id">
9280                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9281                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9282                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9283                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9284                 </fields>
9285                 <links>
9286                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9287                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9288                 </links>
9289         </class>
9290         <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">
9291                 <fields oils_persist:primary="xact">
9292                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9293                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9294                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9295                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9296                 </fields>
9297                 <links>
9298                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9299                 </links>
9300         </class>
9301         <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">
9302                 <fields oils_persist:primary="xact">
9303                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9304                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9305                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9306                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9307                 </fields>
9308                 <links>
9309                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9310                 </links>
9311         </class>
9312         <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)">
9313                 <fields oils_persist:primary="id">
9314                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9315                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9316                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9317                 </fields>
9318                 <links>
9319                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9320                 </links>
9321         </class>
9322         <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">
9323                 <fields oils_persist:primary="id">
9324                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9325                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9326                 </fields>
9327                 <links>
9328                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9329                 </links>
9330         </class>
9331         <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">
9332                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9333                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9334                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9335                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9336                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9337                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9338                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9339                 </fields>
9340                 <links>
9341                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9342                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9343                 </links>
9344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9345                         <actions>
9346                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9347                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9348                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9349                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9350                         </actions>
9351                 </permacrud>
9352         </class>
9353         <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">
9354                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9355                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9356                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9357                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9358                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9359                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9360                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9361                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9362                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9363                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9364                 </fields>
9365                 <links>
9366                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9367                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9368                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9369                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9370                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9371                 </links>
9372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9373                         <actions>
9374                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9375                                         <context link="formula" field="owner"/>
9376                                 </create>
9377                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9378                                         <context link="formula" field="owner"/>
9379                                 </retrieve>
9380                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9381                                         <context link="formula" field="owner"/>
9382                                 </update>
9383                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9384                                         <context link="formula" field="owner"/>
9385                                 </delete>
9386                         </actions>
9387                 </permacrud>
9388         </class>
9389
9390         <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">
9391                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9392                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9393                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9394                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9395                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9396                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9397                 </fields>
9398                 <links>
9399                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9400                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9401                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9402                 </links>
9403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9404                         <actions>
9405                                 <create permission="CREATE_PURCHASE_ORDER">
9406                                         <context link="formula" field="owner"/>
9407                 </create>
9408                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9409                                         <context link="formula" field="owner"/>
9410                 </retrieve>
9411                                 <update permission="CREATE_PURCHASE_ORDER">
9412                                         <context link="formula" field="owner"/>
9413                 </update>
9414                                 <delete permission="CREATE_PURCHASE_ORDER">
9415                                         <context link="formula" field="owner"/>
9416                 </delete>
9417                         </actions>
9418                 </permacrud>
9419         </class>
9420
9421         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9422                 <fields oils_persist:primary="id">
9423                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9424                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9425                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9426                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9427                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9428                 </fields>
9429                 <links>
9430                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9431                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9432                 </links>
9433         </class>
9434
9435         <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">
9436                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9437                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9438                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9439                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9440                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9441                 </fields>
9442                 <links>
9443                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9444                 </links>
9445                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9446                         <actions>
9447                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9448                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9449                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9450                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9451                         </actions>
9452                 </permacrud>
9453         </class>
9454
9455         <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">
9456                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9457                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9458                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9459                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9460                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9461                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9462                 </fields>
9463                 <links>
9464                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9465                 </links>
9466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9467                         <actions>
9468                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9469                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9470                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9471                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9472                         </actions>
9473                 </permacrud>
9474         </class>
9475
9476         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9477                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9478                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9479                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9480                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9481                 </fields>
9482                 <links>
9483                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9484                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9485                 </links>
9486         </class>
9487
9488         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9489                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9490                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9491                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9492                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9493                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9494                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9495                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9496                 </fields>
9497                 <links>
9498                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9499                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9500                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9501                 </links>
9502         </class>
9503
9504         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9505                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9506                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9507                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9508                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9509                 </fields>
9510                 <links>
9511                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9512                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9513                 </links>
9514         </class>
9515
9516         <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">
9517                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9518                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9519                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9520                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9521                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9522                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9523                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9524                 </fields>
9525                 <links>
9526                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9527                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9528                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9529                 </links>
9530         </class>
9531
9532         <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">
9533                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9534                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9535                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9536                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9537                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9538                 </fields>
9539                 <links>
9540                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9541                 </links>
9542                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9543             <actions>
9544                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9545                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9546                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9547                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9548             </actions>
9549                 </permacrud>
9550         </class>
9551
9552         <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">
9553                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9554                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9555                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9556                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9557                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9558                 </fields>
9559                 <links>
9560                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9561                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9562                 </links>
9563                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9564                         <actions>
9565                                 <create permission="ADMIN_CLAIM_POLICY">
9566                                         <context link="claim_policy" field="org_unit"/>
9567                 </create>
9568                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9569                                         <context link="claim_policy" field="org_unit"/>
9570                 </retrieve>
9571                                 <update permission="ADMIN_CLAIM_POLICY">
9572                                         <context link="claim_policy" field="org_unit"/>
9573                 </update>
9574                                 <delete permission="ADMIN_CLAIM_POLICY">
9575                                         <context link="claim_policy" field="org_unit"/>
9576                 </delete>
9577                         </actions>
9578                 </permacrud>
9579         </class>
9580
9581     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9582         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9583             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9584             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9585             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9586             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9587             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9588             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9589             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9590             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9591             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9592             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9593             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9594             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9595             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9596             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9597             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9598             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9599         </fields>
9600         <links>
9601             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9602         </links>
9603     </class>
9604
9605     <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">
9606         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9607             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9608             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9609             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9610             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9611             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9612         </fields>
9613     </class>
9614
9615     <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">
9616         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9617             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9618             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9619             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9620             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9621             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9622             <field reporter:label="City" name="city" reporter:datatype="text"/>
9623             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9624             <field reporter:label="State" name="state" reporter:datatype="text"/>
9625             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9626             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9627             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9628         </fields>
9629     </class>
9630
9631     <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">
9632         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9633             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9634             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9635             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9636             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9637             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9638             <field reporter:label="City" name="city" reporter:datatype="text"/>
9639             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9640             <field reporter:label="State" name="state" reporter:datatype="text"/>
9641             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9642             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9643             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9644         </fields>
9645     </class>
9646
9647     <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">
9648         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9649             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9650             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9651             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9652             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9653             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9654             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9655         </fields>
9656     </class>
9657
9658     <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">
9659         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
9660             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9661             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9662             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9663             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
9664             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
9665             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9666         </fields>
9667     </class>
9668
9669         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9670                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9671                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9672                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9673                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9674                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9675                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9676                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9677                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9678                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9679                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9680                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9681                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9682                 </fields>
9683                 <links>
9684                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9685                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9686                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9687                 </links>
9688         </class>
9689
9690         <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">
9691                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9692                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9693                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9694                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9695                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9696                 </fields>
9697                 <links>
9698                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9699                 </links>
9700         </class>
9701
9702     <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">
9703         <fields>
9704             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9705             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9706             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9707         </fields>
9708                 <links>
9709                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9710                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9711                 </links>
9712     </class>
9713
9714     <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">
9715         <fields>
9716             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9717             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9718         </fields>
9719                 <links>
9720                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9721                 </links>
9722     </class>
9723
9724     <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">
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="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">
9737         <fields>
9738             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9739             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9740         </fields>
9741                 <links>
9742                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9743                 </links>
9744     </class>
9745
9746     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9747                 <oils_persist:source_definition>
9748
9749             SELECT  DISTINCT l.*
9750               FROM  action.unfulfilled_hold_loops l
9751                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9752               WHERE l.count = m.max
9753
9754                 </oils_persist:source_definition>
9755         <fields>
9756             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9757             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9758             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9759         </fields>
9760                 <links>
9761                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9762                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9763                 </links>
9764     </class>
9765
9766         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9767                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9768                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9769                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9770                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9771                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9772                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9773                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9774                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9775                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9776                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9777                 </fields>
9778                 <links>
9779                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9780                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9781                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9782                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9783                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9784                 </links>
9785         </class>
9786
9787         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9788                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9789                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9790                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9791                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9792                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9793                 </fields>
9794                 <links>
9795                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9796                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9797                 </links>
9798         </class>
9799
9800         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9801                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9802                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9803                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9804                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9805                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9806                 </fields>
9807                 <links>
9808                 </links>
9809         </class>
9810
9811         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9812                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9813                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9814                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9815                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9816                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9817                 </fields>
9818                 <links>
9819                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9820                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9821                 </links>
9822         </class>
9823         
9824         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9825                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9826                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9827                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9828                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9829                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9830                 </fields>
9831                 <links>
9832                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9833                 </links>
9834         </class>
9835         
9836         <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">
9837                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9838                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9839                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9840                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9841                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9842                 </fields>
9843                 <links>
9844                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9845                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9846                 </links>
9847         </class>
9848
9849         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9850                 <fields oils_persist:primary="name">
9851                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9852                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9853                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9854                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9855                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9856                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9857                 </fields>
9858                 <links>
9859                 </links>
9860         </class>
9861
9862         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9863                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9864                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9865                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9866                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9867                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9868                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9869                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9870                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9871                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9872                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9873                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9874                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9875                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9876                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9877                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9878                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9879                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9880                 </fields>
9881                 <links>
9882                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9883                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9884                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9885                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9886                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9887                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9888                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9889                 </links>
9890         </class>
9891
9892         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9893                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9894                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9895                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9896                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9897                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9898                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9899                 </fields>
9900                 <links>
9901                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9902                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9903                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9904                 </links>
9905         </class>
9906
9907         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9908                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9909                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9910                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9911                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9912                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9913                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9914                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9915                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9916                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9917                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9918                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9919                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9920                 </fields>
9921                 <links>
9922                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9923                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9924                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9925                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9926                 </links>
9927         </class>
9928
9929         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9930                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9931                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9932                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9933                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9934                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9935                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9936                 </fields>
9937                 <links>
9938                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9939                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9940                 </links>
9941         </class>
9942
9943         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9944                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9945                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9946                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9947                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9948                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9949                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9950                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9951                 </fields>
9952                 <links>
9953                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9954                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9955                 </links>
9956         </class>
9957
9958         <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">
9959                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9960                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9961                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9962                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9963                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9964                 </fields>
9965                 <links>
9966                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9967                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9968                 </links>
9969         </class>
9970
9971         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9972                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9973                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9974                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9975                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9976                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9977                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9978                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9979                 </fields>
9980                 <links>
9981                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9982                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9983                 </links>
9984         </class>
9985
9986         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9987                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9988                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9989                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9990                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9991                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9992                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9993                 </fields>
9994                 <links>
9995                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9996                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9997                 </links>
9998         </class>
9999
10000         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10001                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10002                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10003                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10004                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10005                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10006                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
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                 </links>
10012         </class>
10013
10014         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10015                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10016                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10017                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10018                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10019                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10020                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10021                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10022                 </fields>
10023                 <links>
10024                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10025                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10026                 </links>
10027         </class>
10028
10029         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10030                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10031                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10032                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10033                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10034                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10035                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10036                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10037                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10038                 </fields>
10039                 <links>
10040                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10041                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10042                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10043                 </links>
10044         </class>
10045
10046         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column 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="Table Alias" name="table_alias" reporter:datatype="text"/>
10053                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
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                 </links>
10059         </class>
10060
10061         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10062                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10063                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10064                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10065                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10066                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10067                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10068                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10069                 </fields>
10070                 <links>
10071                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10072                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10073                 </links>
10074         </class>
10075
10076         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10077                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10078                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10079                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10080                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10081                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10082                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10083                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10084                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10085                 </fields>
10086                 <links>
10087                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10088                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10089                 </links>
10090         </class>
10091
10092         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10093                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10094                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10095                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10096                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10097                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10098                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10099                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
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                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10105                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10106                 </links>
10107         </class>
10108
10109         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10110                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10111                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10112                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10113                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10114                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10115                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10116                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10117                 </fields>
10118                 <links>
10119                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10120                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10121                 </links>
10122         </class>
10123
10124         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10125                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10126                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10127                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10128                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10129                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10130                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10131                 </fields>
10132                 <links>
10133                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10134                 </links>
10135         </class>
10136
10137         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10138                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10139                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10140                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10141                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10142                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10143                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10144                 </fields>
10145                 <links>
10146                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10147                 </links>
10148         </class>
10149
10150         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10151                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10152                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10153                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10154                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10155                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10156                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10157                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10158                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10159                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10160                 </fields>
10161                 <links>
10162                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10163                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10164                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10165                 </links>
10166         </class>
10167
10168         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10169                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10170                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10171                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10172                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10173                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10174                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10175                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10176                 </fields>
10177                 <links>
10178                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10179                 </links>
10180         </class>
10181
10182         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10183                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10184                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10185                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10186                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10187                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10188                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10189                 </fields>
10190                 <links>
10191                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10192                 </links>
10193         </class>
10194
10195         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10196                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10197                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10198                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10199                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10200                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10201                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10202                 </fields>
10203                 <links>
10204                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10205                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10206                 </links>
10207         </class>
10208
10209         <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">
10210                 <fields oils_persist:primary="id">
10211                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10212                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10213                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10214                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10215                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10216                 </fields>
10217                 <links>
10218                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10219                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10220                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10221                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10222                 </links>
10223         </class>
10224
10225         <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">
10226                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10227                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10228                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10229                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10230                         <field reporter:label="Record Type" name="rec_type" 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="Default Value" name="default_val" reporter:datatype="text"/>
10234                 </fields>
10235                 <links/>
10236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10237                         <actions>
10238                                 <retrieve/>
10239                         </actions>
10240                 </permacrud>
10241         </class>
10242
10243         <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">
10244                 <fields oils_persist:primary="ptype_key">
10245                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10246                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10247                 </fields>
10248                 <links/>
10249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10250                         <actions>
10251                                 <retrieve/>
10252                         </actions>
10253                 </permacrud>
10254         </class>
10255
10256         <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">
10257                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10258                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10259                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10260                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10261                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10262                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10263                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10264                 </fields>
10265                 <links>
10266                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10267                 </links>
10268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10269                         <actions>
10270                                 <retrieve/>
10271                         </actions>
10272                 </permacrud>
10273         </class>
10274
10275         <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">
10276                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10277                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10278                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10279                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10280                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10281                 </fields>
10282                 <links>
10283                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10284                 </links>
10285                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10286                         <actions>
10287                                 <retrieve/>
10288                         </actions>
10289                 </permacrud>
10290         </class>
10291
10292     <class
10293         id="uvs"
10294         controller="open-ils.cstore open-ils.pcrud"
10295         oils_obj:fieldmapper="url_verify::session"
10296         oils_persist:tablename="url_verify.session"
10297         reporter:label="URL Verification Session"
10298     >
10299         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10300             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10301             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10302                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10303             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10304             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10305             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10306             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10307             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10308             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10309         </fields>
10310
10311         <links>
10312             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10313             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10314             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10315             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10316             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10317         </links>
10318
10319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10320             <actions>
10321                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10322             </actions>
10323         </permacrud>
10324
10325     </class>
10326
10327     <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">
10328         <oils_persist:source_definition>
10329             SELECT
10330                 cbrebi.id AS id,  -- so we can have a pkey in our view
10331                 uvs.id AS session,
10332                 uvs.owning_lib,
10333                 cbrebi.target_biblio_record_entry
10334             FROM url_verify.session uvs
10335             JOIN container.biblio_record_entry_bucket cbreb
10336                 ON (uvs.container = cbreb.id)
10337             JOIN container.biblio_record_entry_bucket_item cbrebi
10338                 ON (cbrebi.bucket = cbreb.id)
10339         </oils_persist:source_definition>
10340         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10341             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10342             <field reporter:label="Session" name="session" reporter:datatype="link" />
10343             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10344             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10345         </fields>
10346         <links>
10347             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10348             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10349             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10350         </links>
10351         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10352             <actions>
10353                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10354             </actions>
10355         </permacrud>
10356     </class>
10357
10358     <class
10359         id="uvus"
10360         controller="open-ils.cstore open-ils.pcrud"
10361         oils_obj:fieldmapper="url_verify::url_selector"
10362         oils_persist:tablename="url_verify.url_selector"
10363         reporter:label="URL Verification URL Selector"
10364     >
10365         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10366             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10367             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10368                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10369             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10370         </fields>
10371
10372         <links>
10373             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10374             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10375         </links>
10376
10377         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10378             <actions>
10379                 <create permission="URL_VERIFY">
10380                     <context link="session" field="owning_lib"/>
10381                 </create>
10382                 <retrieve permission="URL_VERIFY">
10383                     <context link="session" field="owning_lib"/>
10384                 </retrieve>
10385                 <update permission="URL_VERIFY">
10386                     <context link="session" field="owning_lib"/>
10387                 </update>
10388                 <delete permission="URL_VERIFY">
10389                     <context link="session" field="owning_lib"/>
10390                 </delete>
10391             </actions>
10392         </permacrud>
10393
10394     </class>
10395
10396     <class
10397         id="uvu"
10398         controller="open-ils.cstore open-ils.pcrud"
10399         oils_obj:fieldmapper="url_verify::url"
10400         oils_persist:tablename="url_verify.url"
10401         reporter:label="URL Verification URL"
10402     >
10403         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10404             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10405                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10406                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10407                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10408                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10409             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10410             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10411             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10412             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10413             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10414             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10415             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10416             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10417             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10418             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10419             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10420             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10421             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10422         </fields>
10423
10424         <links>
10425             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10426             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10427             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10428             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10429             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10430         </links>
10431
10432         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10433             <actions>
10434                 <create permission="URL_VERIFY">
10435                     <context link="session" field="owning_lib"/>
10436                 </create>
10437                 <retrieve permission="URL_VERIFY">
10438                     <context link="session" field="owning_lib"/>
10439                 </retrieve>
10440                 <update permission="URL_VERIFY">
10441                     <context link="session" field="owning_lib"/>
10442                 </update>
10443                 <delete permission="URL_VERIFY">
10444                     <context link="session" field="owning_lib"/>
10445                 </delete>
10446             </actions>
10447         </permacrud>
10448
10449     </class>
10450
10451     <class
10452         id="uvva"
10453         controller="open-ils.cstore open-ils.pcrud"
10454         oils_obj:fieldmapper="url_verify::verification_attempt"
10455         oils_persist:tablename="url_verify.verification_attempt"
10456         reporter:label="URL Verification Attempt"
10457     >
10458         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10459             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10460                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10461                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10462             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10463             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10464         </fields>
10465
10466         <links>
10467             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10468             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10469         </links>
10470
10471         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10472             <actions>
10473                 <create permission="URL_VERIFY">
10474                     <context link="session" field="owning_lib"/>
10475                 </create>
10476                 <retrieve permission="URL_VERIFY">
10477                     <context link="session" field="owning_lib"/>
10478                 </retrieve>
10479                 <update permission="URL_VERIFY">
10480                     <context link="session" field="owning_lib"/>
10481                 </update>
10482                 <delete permission="URL_VERIFY">
10483                     <context link="session" field="owning_lib"/>
10484                 </delete>
10485             </actions>
10486         </permacrud>
10487
10488     </class>
10489
10490     <class
10491         id="uvuv"
10492         controller="open-ils.cstore open-ils.pcrud"
10493         oils_obj:fieldmapper="url_verify::url_verification"
10494         oils_persist:tablename="url_verify.url_verification"
10495         reporter:label="URL Verification"
10496     >
10497         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10498             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10499                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10500                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10501             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10502             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10503             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10504             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10505                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10506         </fields>
10507
10508         <links>
10509             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10510             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10511             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10512         </links>
10513
10514         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10515             <actions>
10516                 <create permission="URL_VERIFY">
10517                     <context link="attempt" jump="session" field="owning_lib"/>
10518                 </create>
10519                 <retrieve permission="URL_VERIFY">
10520                     <context link="attempt" jump="session" field="owning_lib"/>
10521                 </retrieve>
10522                 <update permission="URL_VERIFY">
10523                     <context link="attempt" jump="session" field="owning_lib"/>
10524                 </update>
10525                 <delete permission="URL_VERIFY">
10526                     <context link="attempt" jump="session" field="owning_lib"/>
10527                 </delete>
10528             </actions>
10529         </permacrud>
10530
10531     </class>
10532
10533         <class
10534                 id="cfdi"
10535                 controller="open-ils.cstore open-ils.pcrud"
10536                 oils_obj:fieldmapper="config::filter_dialog_interface"
10537                 oils_persist:tablename="config.filter_dialog_interface"
10538                 reporter:label="FilterDialog Interface">
10539                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10540                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10541                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10542                 </fields>
10543                 <links>
10544                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10545                 </links>
10546                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10547                         <actions>
10548                                 <retrieve />
10549                         </actions>
10550                 </permacrud>
10551         </class>
10552
10553         <class
10554                 id="cfdfs"
10555                 controller="open-ils.cstore open-ils.pcrud"
10556                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10557                 oils_persist:tablename="config.filter_dialog_filter_set"
10558                 reporter:label="FilterDialog Filter Set">
10559                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10560                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10561                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10562                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10563                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10564                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10565                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10566                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10567                 </fields>
10568                 <links>
10569                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10570                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10571                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10572                 </links>
10573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10574                         <actions>
10575                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10576                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10577                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10578                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10579                         </actions>
10580                 </permacrud>
10581
10582         </class>
10583
10584         <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">
10585                 <fields oils_persist:primary="code">
10586                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10587                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10588                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10589                 </fields>
10590                 <links/>
10591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10592                         <actions>
10593                                 <retrieve/>
10594                         </actions>
10595                 </permacrud>
10596         </class>
10597
10598         <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">
10599                 <oils_persist:source_definition>
10600
10601             SELECT  b.id,
10602                     MAX(dcp.edit_date) AS last_delete_date
10603              FROM   biblio.record_entry b
10604                     JOIN asset.call_number cn ON (cn.record = b.id)
10605                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10606              WHERE  NOT b.deleted
10607              GROUP BY b.id
10608              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10609
10610                 </oils_persist:source_definition>
10611                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10612                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10613                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10614                 </fields>
10615                 <links>
10616                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10617                 </links>
10618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10619                         <actions>
10620                                 <retrieve/>
10621                         </actions>
10622                 </permacrud>
10623         </class>
10624
10625         <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">
10626                 <oils_persist:source_definition>
10627
10628             -- -- 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.
10629             -- -- 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
10630             -- -- may not.
10631             -- SELECT
10632             --     bre.id AS bib_id,
10633             --     COALESCE( z.copy_count, 0 ) AS copy_count,
10634             --     COALESCE( z.hold_count, 0 ) AS hold_count,
10635             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
10636             -- FROM (
10637                 SELECT
10638                     y.bre AS id,
10639                     COALESCE( x.copy_count, 0 ) AS copy_count,
10640                     y.hold_count AS hold_count,
10641                     (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
10642                 FROM (
10643                         SELECT
10644                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
10645                             COUNT(*) AS hold_count
10646                         FROM action.hold_request h
10647                         WHERE
10648                             cancel_time IS NULL
10649                             AND fulfillment_time IS NULL
10650                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10651                         GROUP BY 1
10652                     )y LEFT JOIN (
10653                         SELECT 
10654                             (SELECT id
10655                                 FROM biblio.record_entry 
10656                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10657                             ) AS bre, 
10658                             COUNT(*) AS copy_count
10659                         FROM asset.copy
10660                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10661                         WHERE copy.holdable 
10662                             AND NOT copy.deleted 
10663                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10664                         GROUP BY 1
10665                     )x ON x.bre = y.bre
10666                 -- )z RIGHT JOIN (
10667                 --     SELECT id
10668                 --     FROM biblio.record_entry
10669                 --     WHERE NOT deleted
10670                 -- )bre ON (z.bib_id = bre.id)
10671                 
10672
10673                 </oils_persist:source_definition>
10674                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10675                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10676                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10677                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10678                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10679                 </fields>
10680                 <links>
10681                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10682                 </links>
10683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10684                         <actions>
10685                                 <retrieve/>
10686                         </actions>
10687                 </permacrud>
10688         </class>
10689
10690         <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">
10691                 <oils_persist:source_definition>
10692             SELECT *,
10693                 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,
10694                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10695             FROM
10696                 (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
10697                     FROM
10698                         action.hold_request ahr
10699                         JOIN reporter.hold_request_record rhrr USING (id)
10700                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10701                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10702                     WHERE
10703                         ahr.cancel_time IS NULL
10704                         AND ahr.fulfillment_time IS NULL
10705                     GROUP BY bib_record, pickup_lib
10706                 )x
10707                 JOIN
10708                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10709                     FROM
10710                         action.hold_request ahr
10711                         JOIN reporter.hold_request_record rhrr USING (id)
10712                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10713                     WHERE
10714                         ahr.cancel_time IS NULL
10715                         AND ahr.fulfillment_time IS NULL
10716                     GROUP BY bib_record
10717                 )y
10718                 USING (id)
10719                 </oils_persist:source_definition>
10720                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10721                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10722                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10723                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10724                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10725                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10726                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10727                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10728                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10729                 </fields>
10730                 <links>
10731                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10732                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10733                 </links>
10734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10735                         <actions>
10736                                 <retrieve/>
10737                         </actions>
10738                 </permacrud>
10739         </class>
10740
10741         <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) ">
10742                 <oils_persist:source_definition>
10743             WITH counts_at_ou AS (
10744                 SELECT bib_record, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, 
10745                     COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
10746                 FROM action.hold_request ahr
10747                 JOIN reporter.hold_request_record rhrr USING (id)
10748                 LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10749                 LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10750                 WHERE ahr.cancel_time IS NULL
10751                 AND ahr.fulfillment_time IS NULL
10752                 GROUP BY bib_record, pickup_lib
10753             )
10754             SELECT *,
10755                 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,
10756                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10757             FROM
10758                 (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
10759                 FROM actor.org_unit aou
10760                 JOIN counts_at_ou cao ON (cao.pickup_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))) 
10761                 GROUP BY bib_record, pickup_lib_or_desc
10762                 )x
10763                 JOIN
10764                 (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10765                     FROM
10766                         action.hold_request ahr
10767                         JOIN reporter.hold_request_record rhrr USING (id)
10768                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10769                     WHERE
10770                         ahr.cancel_time IS NULL
10771                         AND ahr.fulfillment_time IS NULL
10772                     GROUP BY bib_record
10773                 )y
10774                 USING (id)
10775                 </oils_persist:source_definition>
10776                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10777                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10778                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
10779                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
10780                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
10781                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10782                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10783                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
10784                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10785                 </fields>
10786                 <links>
10787                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10788                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
10789                 </links>
10790                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10791                         <actions>
10792                                 <retrieve/>
10793                         </actions>
10794                 </permacrud>
10795         </class>
10796
10797         <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">
10798                 <oils_persist:source_definition>
10799             SELECT
10800                 ac.id,
10801                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10802                 MAX(actac.xact_start) AS last_circ
10803             FROM asset.copy ac
10804                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10805             GROUP BY ac.id
10806
10807             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10808             --SELECT
10809             --    ac.id,
10810             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10811             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10812             --FROM asset.copy ac
10813             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10814             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10815             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10816                 </oils_persist:source_definition>
10817                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10818                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10819                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10820                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10821                 </fields>
10822                 <links>
10823                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10824                 </links>
10825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10826                         <actions>
10827                                 <retrieve/>
10828                         </actions>
10829                 </permacrud>
10830         </class>
10831
10832         <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">
10833                 <fields oils_persist:primary="id">
10834                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10835                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10836                 </fields>
10837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10838                         <actions>
10839                                 <retrieve/>
10840                         </actions>
10841                 </permacrud>
10842         </class>
10843
10844         <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">
10845                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10846                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10847                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10848                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10849                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10850                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10851                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10852                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10853                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10854                 </fields>
10855                 <links>
10856                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10857                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10858                 </links>
10859                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10860                         <actions>
10861                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10862                                 <retrieve/>
10863                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10864                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10865                         </actions>
10866                 </permacrud>
10867         </class>
10868
10869         <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">
10870                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10871                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10872                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10873                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10874                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10875                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10876                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10877                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10878                 </fields>
10879                 <links>
10880                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10881                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10882                 </links>
10883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10884                         <actions>
10885                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10886                                 <retrieve/>
10887                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10888                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10889                         </actions>
10890                 </permacrud>
10891         </class>
10892
10893
10894         <!-- ********************************************************************************************************************* -->
10895         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10896         <!-- ********************************************************************************************************************* -->
10897         <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">
10898                 <fields oils_persist:primary="id">
10899                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10900                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10901                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10902                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10903                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10904                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10905                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10906                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10907                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10908                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10909                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10910                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10911                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10912                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10913                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10914                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10915                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10916                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10917                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10918                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10919                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10920                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10921                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10922                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10923                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10924                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10925                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10926                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10927                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10928                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10929                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10930                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10931                 </fields>
10932                 <links>
10933                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10934                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10935                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10936                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10937                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10938                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10939                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10940                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10941                 </links>
10942         </class>
10943
10944         <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">
10945                 <fields oils_persist:primary="id">
10946                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10947                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10948                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10949                 </fields>
10950                 <links>
10951                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10952                 </links>
10953         </class>
10954
10955         <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">
10956                 <fields oils_persist:primary="id">
10957                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10958                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10959                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10960                 </fields>
10961                 <links>
10962                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10963                 </links>
10964         </class>
10965
10966         <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">
10967                 <fields oils_persist:primary="id">
10968                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10969
10970                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10971                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10972                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10973
10974                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10975                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10976                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10977
10978                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10979                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10980
10981                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10982                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10983                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10984
10985                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10986                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10987
10988                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10989                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10990                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10991
10992                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10993                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10994                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10995
10996                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10997                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10998                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10999                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11000
11001                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11002                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11003
11004                 </fields>
11005                 <links>
11006                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11007                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11008                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11009                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11010                 </links>
11011         </class>
11012
11013         <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">
11014                 <oils_persist:source_definition>
11015
11016             SELECT
11017                 po.ordering_agency AS ordering_agency,
11018                 po.id AS purchase_order,
11019                 li.id AS lineitem,
11020                 lid.id AS lineitem_detail,
11021                 cpa.id AS claim_policy_action
11022             FROM
11023                 acq.lineitem_detail lid
11024                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11025                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11026                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11027                 JOIN acq.claim_policy_action cpa ON (
11028                     cpa.claim_policy = cp.id
11029
11030                     -- we only care about claim policy actions whose claim
11031                     -- interval we'd reached or exceeded
11032                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11033
11034                     -- filter out all claim policy actions where claim events
11035                     -- have occurred on or after the action's action_interval
11036                     AND NOT EXISTS (
11037                         SELECT 1
11038                         FROM
11039                             acq.claim_event evt
11040                             JOIN acq.claim claim ON (
11041                                 claim.id = evt.claim
11042                                 AND claim.lineitem_detail = lid.id
11043                             )
11044                         WHERE
11045                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11046                     )
11047                 )
11048             WHERE
11049                 lid.cancel_reason IS NULL
11050                 AND li.cancel_reason IS NULL -- belt/suspenders
11051                 AND po.cancel_reason IS NULL -- belt/suspenders
11052                 AND lid.recv_time IS NULL
11053                 AND po.state = 'on-order'
11054             ORDER BY 1, 2, 3, 4, 5
11055
11056                 </oils_persist:source_definition>
11057                 <fields>
11058                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11059                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11060                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11061                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11062                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11063                 </fields>
11064                 <links>
11065                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11066                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11067                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11068                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11069                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11070                 </links>
11071         </class>
11072         <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">
11073                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11074                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11075                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11076                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11077                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11078                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11079                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11080                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11081                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11082                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11083                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11084                 </fields>
11085                 <links>
11086                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11087                 </links>
11088     </class>
11089         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11090                 <oils_persist:source_definition>
11091             SELECT * FROM acq.lineitem_summary 
11092                                 WHERE item_count > (invoice_count + cancel_count)
11093         </oils_persist:source_definition>
11094                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11095                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11096                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11097                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11098                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11099                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11100                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11101                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11102                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11103                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11104                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11105                 </fields>
11106                 <links>
11107                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11108                 </links>
11109     </class>
11110         <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">
11111                 <oils_persist:source_definition>
11112
11113                         SELECT  t.*
11114                           FROM  action.transit_copy t
11115                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11116                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11117                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11118
11119                 </oils_persist:source_definition>
11120                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11121                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11122                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11123                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11124                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11125                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11126                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11127                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11128                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11129                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11130                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11131                 </fields>
11132                 <links>
11133                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11134                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11135                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11136                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11137                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11138                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11139                 </links>
11140         </class>
11141
11142     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11143                 <oils_persist:source_definition>
11144
11145         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11146                 SELECT
11147                         cp.id as copy,
11148                         COUNT(circ.id),
11149                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11150                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11151                 FROM
11152                         asset.copy cp
11153                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11154                 GROUP BY 1, 3, 4
11155                 UNION ALL
11156                 SELECT
11157                         cp.id as copy,
11158                         COUNT(circ.id),
11159                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11160                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11161                 FROM
11162                         asset.copy cp
11163                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11164                 GROUP BY 1, 3, 4
11165                 UNION ALL
11166                 SELECT
11167                         id as copy,
11168                         circ_count,
11169                         -1 AS year,
11170                         false as is_renewal
11171                 FROM
11172                         extend_reporter.legacy_circ_count
11173         )x GROUP BY 1, 3, 4
11174
11175                 </oils_persist:source_definition>
11176         <fields>
11177             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11178             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11179             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11180             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11181         </fields>
11182                 <links>
11183                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11184                 </links>
11185                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11186                         <actions>
11187                                 <retrieve/>
11188                         </actions>
11189                 </permacrud>
11190     </class>
11191
11192         <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">
11193                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11194                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11195                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11196                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11197                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11198                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11199                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11200                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11201                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11202                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11203                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11204                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11205                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11206                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11207                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11208                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11209                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11210                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11211                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11212                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11213                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11214                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11215                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11216                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11217                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11218                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11219                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11220                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11221                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11222                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11223                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11224                 </fields>
11225                 <links>
11226                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11227                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11228                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11229                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11230                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11231                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11232                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11233                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11234                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11235                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11236                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11237                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11238                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11239                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11240                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11241                 </links>
11242         </class>
11243
11244     <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">
11245         <fields oils_persist:primary="id">
11246             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11247             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11248             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11249             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11250             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11251             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11252             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11253             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11254             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11255             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11256             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11257             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11258             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11259             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11260             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11261             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11262             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11263             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11264             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11265             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11266             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11267             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11268             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11269             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11270             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11271             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11272             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11273             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11274             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11275             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11276             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11277             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11278             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11279             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11280         </fields>
11281         <links>
11282             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11283             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11284             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11285             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11286             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11287             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11288             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11289             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11290         </links>
11291     </class>
11292
11293     <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">
11294         <fields oils_persist:primary="id">
11295             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11296             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11297             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11298             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11299         </fields>
11300         <links>
11301             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11302             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11303         </links>
11304     </class>
11305
11306     <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">
11307         <fields oils_persist:primary="owning_lib">
11308             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11309             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11310             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11311         </fields>
11312         <links>
11313             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11314         </links>
11315     </class>
11316
11317     <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">
11318         <fields oils_persist:primary="id">
11319             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11320             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11321             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11322             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11323             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11324         </fields>
11325         <links>
11326             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11327             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11328             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11329         </links>
11330     </class>
11331
11332     <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">
11333         <fields oils_persist:primary="circ_lib">
11334             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11335             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11336             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11337             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11338         </fields>
11339         <links>
11340             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11341             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11342         </links>
11343     </class>
11344
11345     <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">
11346         <fields oils_persist:primary="id">
11347             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11348             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11349             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11350             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11351             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11352         </fields>
11353         <links>
11354             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11355             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11356             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11357         </links>
11358     </class>
11359
11360     <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">
11361         <fields oils_persist:primary="home_ou">
11362             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11363             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11364             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11365             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11366         </fields>
11367         <links>
11368             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11369             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11370         </links>
11371     </class>
11372         <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">
11373                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11374                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11375                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11376                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11377                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11378                 </fields>
11379                 <links>
11380                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11381                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11382                 </links>
11383                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11384                         <actions>
11385                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11386                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11387                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11388                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11389                         </actions>
11390                 </permacrud>
11391         </class>
11392         <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">
11393                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11394                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11395                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11396                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11397                 </fields>
11398                 <links>
11399                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11400                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11401                         </links>
11402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11403                 <actions>
11404                                 <create permission="ADMIN_ACQ_FUND_TAG">
11405                                         <context link="tag" field="owner"/>
11406                                 </create>
11407                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11408                                         <context link="tag" field="owner"/>
11409                                 </retrieve>
11410                                 <update permission="ADMIN_ACQ_FUND_TAG">
11411                                         <context link="tag" field="owner"/>
11412                                 </update>
11413                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11414                                         <context link="tag" field="owner"/>
11415                                 </delete>
11416                         </actions>
11417                 </permacrud>
11418         </class>
11419         <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">
11420                 <oils_persist:source_definition><![CDATA[
11421                 SELECT
11422                         poi.purchase_order AS purchase_order,
11423                         ii.invoice AS invoice,
11424                         NULL AS lineitem,
11425                         poi.id AS po_item,
11426                         NULL AS picklist
11427                 FROM
11428                         acq.po_item poi
11429                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11430                 UNION SELECT
11431                         jub.purchase_order AS purchase_order,
11432                         ie.invoice AS invoice,
11433                         jub.id AS lineitem,
11434                         NULL AS po_item,
11435                         jub.picklist AS picklist
11436                 FROM
11437                         acq.lineitem jub
11438                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11439                 UNION SELECT
11440                         ii.purchase_order AS purchase_order,
11441                         ii.invoice AS invoice,
11442                         NULL AS lineitem,
11443                         NULL AS po_item,
11444                         NULL AS picklist
11445                 FROM
11446                         acq.invoice_item ii
11447                 WHERE ii.po_item IS NULL
11448                 UNION SELECT
11449                         ie.purchase_order AS purchase_order,
11450                         ie.invoice AS invoice,
11451                         NULL AS lineitem,
11452                         NULL AS po_item,
11453                         NULL AS picklist
11454                 FROM
11455                         acq.invoice_entry ie
11456                 WHERE ie.lineitem IS NULL
11457                 UNION SELECT
11458                         NULL AS purchase_order,
11459                         NULL AS invoice,
11460                         jub.id AS lineitem,
11461                         NULL AS po_item,
11462                         jub.picklist AS picklist
11463                 FROM
11464                         acq.lineitem jub
11465                 WHERE jub.purchase_order IS NULL
11466                 ]]></oils_persist:source_definition>
11467                 <fields>
11468                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11469                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11470                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11471                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11472                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11473                 </fields>
11474                 <links>
11475                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11476                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11477                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11478                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11479                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11480                 </links>
11481         </class>
11482         <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">
11483                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11484                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11485                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11486                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11487                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11488                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11489                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11490                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11491                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11492                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11493                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11494                 </fields>
11495                 <links>
11496                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11497                 </links>
11498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11499                         <actions>
11500                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11501                                 <retrieve/>
11502                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11503                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11504                         </actions>
11505                 </permacrud>
11506         </class>
11507
11508         <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">
11509                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11510                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11511                         <field name="date_applied" reporter:datatype="timestamp"/>
11512                         <field name="org" reporter:datatype="org_unit"/>
11513                         <field name="original_value" reporter:datatype="text"/>
11514                         <field name="new_value" reporter:datatype="text"/>
11515                         <field name="field_name" reporter:datatype="link"/>
11516                 </fields>
11517                 <links>
11518                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11519                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11520                 </links>
11521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11522                         <actions>
11523                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11524                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11525                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11526                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11527                         </actions>
11528                 </permacrud>
11529         </class>
11530         <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">
11531                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11532                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11533                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11534                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11535                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11536                 </fields>
11537                 <links>
11538                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11539                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11540                 </links>
11541         </class>
11542         <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">
11543                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11544                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11545                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11546                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11547                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11548                 </fields>
11549                 <links>
11550                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11551                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11552                 </links>
11553         </class>
11554         <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">
11555                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11556                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11557                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11558                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11559                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11560                 </fields>
11561                 <links>
11562                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11563                 </links>
11564                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11565                         <actions>
11566                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11567                                 <retrieve/>
11568                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11569                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11570                         </actions>
11571                 </permacrud>
11572         </class>
11573         <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">
11574                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11575                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11576                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11577                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11578                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11579                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11580                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11581                 </fields>
11582                 <links>
11583                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11584                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11585                 </links>
11586                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11587                         <actions>
11588                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11589                                 <retrieve/>
11590                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11591                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11592                         </actions>
11593                 </permacrud>
11594         </class>
11595         <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">
11596         <oils_persist:source_definition>
11597         SELECT ahcm.target_copy AS id,count(*) AS count
11598          FROM
11599          action.hold_request ahr,
11600          action.hold_copy_map ahcm
11601          WHERE
11602          ahr.cancel_time IS NULL AND
11603          ahr.fulfillment_time IS NULL AND
11604          ahr.capture_time IS NULL AND
11605          ahr.id = ahcm.hold
11606          GROUP BY ahcm.target_copy
11607         </oils_persist:source_definition>
11608         <fields oils_persist:primary="id">
11609             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11610             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11611         </fields>
11612         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11613             <actions>
11614                <retrieve/>
11615             </actions>
11616         </permacrud>
11617         </class>
11618
11619         <!-- ********************************************************************************************************************* -->
11620
11621 </IDL>
11622
11623 <!--
11624     vim:noet:ts=4:sw=4:
11625 -->