]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP1847800 Admin grid filter display, default fields, IDL repairs
[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" reporter:selector="field"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link" config_field="true"/>
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="label"/>
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                         <field reporter:label="Fields" name="import_bib_trash_fields" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
347                 </fields>
348                 <links>
349                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
350                         <link field="import_bib_trash_fields" reltype="has_many" key="grp" map="" class="vibtf"/>
351                 </links>
352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
353                         <actions>
354                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <retrieve/>
356                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
357                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
358                         </actions>
359                 </permacrud>
360         </class>
361
362
363         <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">
364                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
365                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
366                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
367                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
368                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
369                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
370                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
371                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
372                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
373                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
374                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
375                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
376                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
377                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
378                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
379                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
380                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
381                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
382                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
383                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
384                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
385                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
386                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
387                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
388                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
389                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
390                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
391                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
392                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
393                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
394                 </fields>
395                 <links>
396                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
397                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
398                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
399                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
400                 </links>
401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
402                         <actions>
403                                 <create permission="CREATE_IMPORT_ITEM">
404                     <context link="definition" field="owner"/>
405                                 </create>
406                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
407                     <context link="definition" field="owner"/>
408                                 </retrieve>
409                                 <update permission="UPDATE_IMPORT_ITEM">
410                     <context link="definition" field="owner"/>
411                                 </update>
412                                 <delete permission="DELETE_IMPORT_ITEM">
413                     <context link="definition" field="owner"/>
414                                 </delete>
415                         </actions>
416                 </permacrud>
417         </class>
418
419         <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">
420                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
421                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
422                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
423                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
424                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
425                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
426                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
427                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
428                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
429                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
430                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
431                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
432                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
433                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
434                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
435                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
436                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
437                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
438                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
439                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
440                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
441                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
442                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
443                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
444                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
445                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
446                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
447                 </fields>
448                 <links>
449                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
450                 </links>
451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
452                         <actions>
453                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <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"/>
455                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
456                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
457                         </actions>
458                 </permacrud>
459         </class>
460
461         <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">
462                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
463                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
464                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
465                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
466                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
467                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
468                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
469                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
470                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
471                 </fields>
472                 <links>
473                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
474                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
475                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
476                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
477                 </links>
478                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
479                         <actions>
480                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
483                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
484                         </actions>
485                 </permacrud>
486         </class>
487
488         <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">
489                 <fields oils_persist:primary="code">
490                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
491                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
492                 </fields>
493                 <links>
494                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
495                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
496                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
497                 </links>
498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
499                         <actions>
500                                 <retrieve/>
501                         </actions>
502                 </permacrud>
503         </class>
504
505         <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">
506                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
507                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
508                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
509                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
510                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
511                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
512                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
513                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
514                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
515                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
516                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
517                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
519                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
520                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
521                 </fields>
522                 <links>
523                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
524                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
525                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
526                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
527             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
528             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
529             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
530                 </links>
531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
532                         <actions>
533                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
536                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
537                         </actions>
538                 </permacrud>
539         </class>
540
541         <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">
542                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
543                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
544                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
545                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
546                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
547                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
548                 </fields>
549                 <links/>
550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
551                         <actions>
552                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
553                 <retrieve/>
554                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
555                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
556                         </actions>
557                 </permacrud>
558         </class>
559
560         <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">
561                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
562                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
563                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
564                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
565                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
566                 </fields>
567                 <links>
568                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
569                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
570                 </links>
571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
572                         <actions>
573                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
576                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
577                         </actions>
578                 </permacrud>
579         </class>
580
581         <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">
582                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
583                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
584                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
585                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
586                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
587                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
588                 </fields>
589                 <links>
590                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
591                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
592                 </links>
593                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
594                         <actions>
595                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
598                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
599                         </actions>
600                 </permacrud>
601         </class>
602
603         <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">
604                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
605                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
606                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
607                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
608                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
609                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
610                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
611                 </fields>
612                 <links>
613                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
614                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
615                 </links>
616                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
617                         <actions>
618                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
622                         </actions>
623                 </permacrud>
624         </class>
625
626         <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">
627                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
628                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
629                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
630                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
631                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
632                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
633                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
634                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
635                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
636                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
637                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
638                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
639                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
640                 </fields>
641                 <links>
642                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
643                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
644                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
645             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
646             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
647                 </links>
648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
649                         <actions>
650                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
653                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
654                         </actions>
655                 </permacrud>
656         </class>
657
658         <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">
659                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
660                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
661                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
662                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
663                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
664                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
665                 </fields>
666                 <links/>
667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
668                         <actions>
669                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                 <retrieve/>
671                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
672                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
673                         </actions>
674                 </permacrud>
675         </class>
676
677         <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">
678                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
679                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
680                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
681                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
682                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
683                 </fields>
684                 <links>
685                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
686                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
687                 </links>
688                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
689                         <actions>
690                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
693                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
694                         </actions>
695                 </permacrud>
696         </class>
697
698         <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">
699                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
700                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
701                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
702                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
703                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
704                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
705                 </fields>
706                 <links>
707                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
708                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
709                 </links>
710                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
711                         <actions>
712                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
715                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
716                         </actions>
717                 </permacrud>
718         </class>
719
720         <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">
721                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
722                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
723                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
724                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
725                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
726                 </fields>
727                 <links>
728                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
729                 </links>
730                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
731                         <actions>
732                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
734                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
735                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
736                         </actions>
737                 </permacrud>
738         </class>
739
740         <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">
741                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
742                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
743                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
744                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
745                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
746                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
747                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
748                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
749             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
750                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
751                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
752                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
753                 </fields>
754                 <links>
755                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
756                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
757                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
758                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
759                 </links>
760                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
761                         <actions>
762                                 <create permission="ADMIN_IMPORT_MATCH_SET">
763                     <context link="match_set" field="owner"/>
764                                 </create>
765                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
766                     <context link="match_set" field="owner"/>
767                                 </retrieve>
768                                 <update permission="ADMIN_IMPORT_MATCH_SET">
769                     <context link="match_set" field="owner"/>
770                                 </update>
771                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
772                     <context link="match_set" field="owner"/>
773                                 </delete>
774                         </actions>
775                 </permacrud>
776         </class>
777
778         <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">
779                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
780                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
781                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
782                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
783                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
784                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
785                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
786                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
787                 </fields>
788                 <links>
789                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
790                 </links>
791                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
792                         <actions>
793                                 <create permission="ADMIN_IMPORT_MATCH_SET">
794                     <context link="match_set" field="owner"/>
795                                 </create>
796                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
797                     <context link="match_set" field="owner"/>
798                                 </retrieve>
799                                 <update permission="ADMIN_IMPORT_MATCH_SET">
800                     <context link="match_set" field="owner"/>
801                                 </update>
802                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
803                     <context link="match_set" field="owner"/>
804                                 </delete>
805                         </actions>
806                 </permacrud>
807         </class>
808
809         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
810                 oils_obj:fieldmapper="vandelay::session_tracker" 
811                 oils_persist:tablename="vandelay.session_tracker" 
812                 reporter:label="Vandelay Session Tracker">
813                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
814                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
815                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
816                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
817                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
818                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
819                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
820                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
821                                          queue or an auth queue and there's no IDL class for vandelay.queue .
822                                          parent table.
823                         -->
824                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
825                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
826                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
827                         <field reporter:label="State" name="state" reporter:datatype="text"/>
828                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
829                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
830                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
831                 </fields>
832                 <links>
833                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
834                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
835                 </links>
836                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
837                         <actions>
838                                 <!-- created by the API -->
839                                 <retrieve global_required="true"
840                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
841                                 <update global_required="true"
842                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
843                                         <context link="workstation" field="owning_lib"/>
844                                 </update>
845                                 <delete 
846                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
847                                         <context link="workstation" field="owning_lib"/>
848                                 </delete>
849                         </actions>
850                 </permacrud>
851         </class>
852
853         <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">
854                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
855                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
856                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
857                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
858                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
859                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
860                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
861                 </fields>
862                 <links>
863                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
864                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
865                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
866                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
867                 </links>
868         </class>
869
870     <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">
871         <fields oils_persist:primary="name">
872             <field reporter:label="Name" name="name" reporter:datatype="text"/>
873             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
874             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
875             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
876         </fields>
877         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
878             <actions>
879                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
880                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
882                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
883             </actions>
884         </permacrud>
885     </class>
886
887     <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">
888         <fields oils_persist:primary="id">
889             <field reporter:label="ID" name="id" reporter:datatype="id"/>
890             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
891             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
892             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
893             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
894         </fields>
895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
896             <actions>
897                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
898                 <retrieve/>
899                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
900                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
901             </actions>
902         </permacrud>
903     </class>
904
905         <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">
906                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
907                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
908                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
909                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
910                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
911                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
912                 </fields>
913                 <links>
914                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
915                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
916                 </links>
917         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
918             <actions>
919                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
920                 <retrieve/>
921                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
922                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
923             </actions>
924         </permacrud>
925         </class>
926
927         <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">
928                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
929                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
930                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
931                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
932         </fields>
933         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
934             <actions>
935                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
936                 <retrieve/>
937                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
938                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
939             </actions>
940         </permacrud>
941         </class>
942
943         <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">
944                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
945                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
946                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
947                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
948                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
949                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
950                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
951                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
952                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
953                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
954                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
955                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
956         </fields>
957                 <links>
958                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
959                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
960         </links>
961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
962             <actions>
963                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
964                 <retrieve/>
965                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
966                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
967             </actions>
968         </permacrud>
969         </class>
970
971         <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">
972                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
973                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
974                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
975                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
976                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
977                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
978                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
979                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
980                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
981                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
982                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
983         </fields>
984                 <links>
985                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
986                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
987         </links>
988         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
989             <actions>
990                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
991                 <retrieve/>
992                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
993                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
994             </actions>
995         </permacrud>
996         </class>
997
998         <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">
999                 <fields oils_persist:primary="name">
1000                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
1001                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1002                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1003                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1004                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1005                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1006                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1007                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1008                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1009                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1010                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1011                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1012                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1013                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1014                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1015                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1016                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1017                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1018                 </fields>
1019                 <links>
1020                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1021                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1022                 </links>
1023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1024             <actions>
1025                 <create permission="ADMIN_SVF" global_required="true"/>
1026                 <retrieve/>
1027                 <update permission="ADMIN_SVF" global_required="true"/>
1028                 <delete permission="ADMIN_SVF" global_required="true"/>
1029             </actions>
1030         </permacrud>
1031         </class>
1032
1033         <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">
1034                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1035                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1036                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1037                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1038             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
1039                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1040                 </fields>
1041                 <links/>
1042         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1043             <actions>
1044                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1045                 <retrieve/>
1046                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1047                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1048             </actions>
1049         </permacrud>
1050         </class>
1051
1052         <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">
1053                 <fields oils_persist:primary="coded_value">
1054                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1055                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1056                 </fields>
1057                 <links>
1058                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1059                 </links>
1060         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1061             <actions>
1062                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1063                 <retrieve/>
1064                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1065                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1066             </actions>
1067         </permacrud>
1068         </class>
1069
1070         <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">
1071                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1072                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1073                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1074                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1075                 </fields>
1076                 <links>
1077                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1078                 </links>
1079         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1080             <actions>
1081                 <retrieve/>
1082             </actions>
1083         </permacrud>
1084         </class>
1085
1086
1087         <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">
1088                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1089                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1090                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1091                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1092                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1093                 </fields>
1094                 <links>
1095                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1096                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1097                 </links>
1098         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1099             <actions>
1100                 <retrieve/>
1101             </actions>
1102         </permacrud>
1103         </class>
1104
1105
1106         <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">
1107                 <fields oils_persist:primary="source">
1108                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1109                         <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 -->
1110                 </fields>
1111                 <links>
1112                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1113                 </links>
1114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1115             <actions>
1116                 <retrieve/>
1117             </actions>
1118         </permacrud>
1119         </class>
1120
1121         <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">
1122                 <fields>
1123                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1124                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1125                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1126                 </fields>
1127                 <links>
1128                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1129                 </links>
1130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1131             <actions>
1132                 <retrieve/>
1133             </actions>
1134         </permacrud>
1135         </class>
1136
1137         <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">
1138                 <fields oils_persist:primary="id">
1139                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1140                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1141                 </fields>
1142                 <links>
1143                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1144                 </links>
1145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1146             <actions>
1147                 <retrieve/>
1148             </actions>
1149         </permacrud>
1150         </class>
1151
1152         <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">
1153                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1154                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1155                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1156                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1157                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1158                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1159                 </fields>
1160                 <links>
1161                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1162                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1163                 </links>
1164         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1165             <actions>
1166                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1167                 <retrieve/>
1168                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1169                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1170             </actions>
1171         </permacrud>
1172         </class>
1173
1174         <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">
1175                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1176                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1177                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1178                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1179                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1180                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1181                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1182                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1183             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1184             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1185             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1186                 </fields>
1187                 <links>
1188                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1189                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1190                 </links>
1191         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1192             <actions>
1193                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1194                 <retrieve/>
1195                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1196                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1197             </actions>
1198         </permacrud>
1199         </class>
1200
1201         <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">
1202                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1203                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1204                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1205                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1206                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1207                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1208                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1209                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1210                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1211                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1212                 </fields>
1213                 <links>
1214                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1215                 </links>
1216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1217             <actions>
1218                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1219                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1221                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1222             </actions>
1223         </permacrud>
1224         </class>
1225
1226     <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">
1227         <fields oils_persist:primary="name">
1228             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1229             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1230             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1231             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1232             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1233             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1234             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1235             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1236             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link" config_field="true"/>
1237             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1238         </fields>
1239         <links>
1240             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1241             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1242         </links>
1243         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1244             <actions>
1245                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1246                 <retrieve/>
1247                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1248                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1249             </actions>
1250         </permacrud>
1251     </class>
1252
1253     <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">
1254         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1255             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1256             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link" config_field="true"/>
1257             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1258             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1259             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1260             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1261             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1262         </fields>
1263         <links>
1264             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1265         </links>
1266         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1267             <actions>
1268                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1269                 <retrieve/>
1270                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1271                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1272             </actions>
1273         </permacrud>
1274     </class>
1275
1276     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1277                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1278                         oils_persist:tablename="config.z3950_index_field_map" 
1279                         reporter:label="Z39.50 Index Field Map">
1280         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1281             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1282             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1283             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1284             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1285             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1286             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1287         </fields>
1288         <links>
1289             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1290             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1291             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1292         </links>
1293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1294             <actions>
1295                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1296                 <retrieve/>
1297                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1298                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1299             </actions>
1300         </permacrud>
1301     </class>
1302
1303
1304         <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">
1305                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1306                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1307                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1308                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1309                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1310                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1311                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1312                 </fields>
1313                 <links>
1314             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1315             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1316                 </links>
1317                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1318                         <actions>
1319                                 <retrieve/>
1320                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1321                         </actions>
1322                 </permacrud>
1323         </class>
1324
1325         <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">
1326                 <fields oils_persist:primary="key">
1327                         <field reporter:label="Hook Key" name="key" reporter:datatype="text" reporter:selector="key"/>
1328                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1329                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1330                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1331                 </fields>
1332                 <links/>
1333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1334                         <actions>
1335                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1336                                 <retrieve/>
1337                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1338                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1339                         </actions>
1340                 </permacrud>
1341         </class>
1342
1343         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1344                 <fields oils_persist:primary="module">
1345                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1346                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1347                 </fields>
1348                 <links/>
1349         </class>
1350
1351         <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">
1352                 <fields oils_persist:primary="module">
1353                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1354                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1355                 </fields>
1356                 <links/>
1357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1358                         <actions>
1359                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1360                                 <retrieve/>
1361                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1362                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1363                         </actions>
1364                 </permacrud>
1365         </class>
1366
1367         <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">
1368                 <fields oils_persist:primary="module">
1369                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1370                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1371                 </fields>
1372                 <links/>
1373                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1374                         <actions>
1375                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1376                                 <retrieve/>
1377                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1378                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1379                         </actions>
1380                 </permacrud>
1381         </class>
1382
1383         <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">
1384                 <fields oils_persist:primary="module">
1385                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1386                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1387                 </fields>
1388                 <links/>
1389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1390                         <actions>
1391                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1392                                 <retrieve/>
1393                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1394                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1395                         </actions>
1396                 </permacrud>
1397         </class>
1398
1399         <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">
1400                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1401                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1402                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1403                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1404                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1405                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1406                 </fields>
1407                 <links>
1408                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1409                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1410                 </links>
1411                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1412                         <actions>
1413                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1414                     <context link="event_def" field="owner"/>
1415                 </create>
1416                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1417                     <context link="event_def" field="owner"/>
1418                 </retrieve>
1419                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1420                     <context link="event_def" field="owner"/>
1421                 </update>
1422                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1423                     <context link="event_def" field="owner"/>
1424                 </delete>
1425                         </actions>
1426                 </permacrud>
1427         </class>
1428
1429         <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">
1430                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1431                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1432                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1433                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1434                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1435                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1436                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1437                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1438                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1439                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1440                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1441                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1442                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1443                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1444                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1445                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1446                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1447                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1448                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1449                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1450                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1451                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1452                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1453                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1454                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1455                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1456                 </fields>
1457                 <links>
1458                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1459                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1460                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1461                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1462                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1463                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1464                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1465                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1466                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1467                 </links>
1468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1469                         <actions>
1470                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1471                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1472                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1473                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1474                         </actions>
1475                 </permacrud>
1476         </class>
1477
1478         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1479                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1480                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1481                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1482                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1483                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1484                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1485                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1486                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1487                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1488                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1489                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1490                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1491                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1492                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1493                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1494                 </fields>
1495                 <links>
1496                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1497                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1498                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1499                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1500                 </links>
1501         </class>
1502
1503         <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">
1504                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1505                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1506                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1507                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1508                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1509                 </fields>
1510                 <links>
1511                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1512                 </links>
1513                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1514                         <actions>
1515                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1516                     <context link="event_def" field="owner"/>
1517                 </create>
1518                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1519                     <context link="event_def" field="owner"/>
1520                 </retrieve>
1521                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1522                     <context link="event_def" field="owner"/>
1523                 </update>
1524                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1525                     <context link="event_def" field="owner"/>
1526                 </delete>
1527                         </actions>
1528                 </permacrud>
1529         </class>
1530
1531         <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">
1532                 <oils_persist:source_definition><![CDATA[
1533                 SELECT  atevdef.hook,
1534                         atevdef.name,
1535                         atevdef.reactor,
1536                         atev.id,
1537                         atev.event_def,
1538                         atev.add_time,
1539                         atev.run_time,
1540                         atev.start_time,
1541                         atev.update_time,
1542                         atev.complete_time,
1543                         atev.update_process,
1544                         atev.state,
1545                         atev.user_data,
1546                         atev.template_output,
1547                         atev.error_output,
1548                         atev.async_output,
1549                         targ_circ.id AS target_circ,
1550                         targ_ahr.id AS target_hold,
1551                         COALESCE(
1552                                 targ_circ.circ_lib,
1553                                 targ_ahr.pickup_lib
1554                         ) AS perm_lib
1555                 FROM action_trigger.event atev
1556                 JOIN action_trigger.event_definition atevdef ON
1557                         (atevdef.id = atev.event_def)
1558                 JOIN action_trigger.hook ath ON
1559                         (ath.key = atevdef.hook)
1560                 LEFT JOIN action.circulation targ_circ ON
1561                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1562                 LEFT JOIN action.hold_request targ_ahr ON
1563                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1564                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1565                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1566                                 'circ.staff.max_visible_event_age',
1567                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1568                         ) UNION
1569                         SELECT '1000 YEARS'::INTERVAL AS value
1570                 ) ous)
1571                 ]]></oils_persist:source_definition>
1572                 <fields oils_persist:primary="id">
1573                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1574                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1575                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1576                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1577                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1578                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1579                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1580                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1581                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1582                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1583                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1584                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1585                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1586                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1587                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1588                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1589                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1590                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1591                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1592                 </fields>
1593                 <links>
1594                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1595                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1596                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1597                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1598                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1599                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1600                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1601                 </links>
1602                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1603                         <actions>
1604                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1605                         </actions>
1606                 </permacrud>
1607         </class>
1608
1609         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1610                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1611                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1612                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1613                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1614                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1615                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1616                 </fields>
1617                 <links>
1618                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1619                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1620                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1621                 </links>
1622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1623                         <actions>
1624                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1625                         </actions>
1626                 </permacrud>
1627         </class>
1628
1629         <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">
1630                 <fields oils_persist:primary="code">
1631                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1632                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1633                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1634                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1635                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1636                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1637                 </fields>
1638                 <links/>
1639         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1640             <actions>
1641                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1642                 <retrieve/>
1643                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1644                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1645             </actions>
1646         </permacrud>
1647         </class>
1648
1649         <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">
1650                 <fields oils_persist:primary="code">
1651                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1652                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1653                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1654                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1655                 </fields>
1656                 <links/>
1657         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1658             <actions>
1659                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1660                 <retrieve/>
1661                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1662                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1663             </actions>
1664         </permacrud>
1665         </class>
1666
1667         <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">
1668                 <fields oils_persist:primary="code">
1669                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1670                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1671                 </fields>
1672                 <links/>
1673         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1674             <actions>
1675                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1676                 <retrieve/>
1677                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1678                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1679             </actions>
1680         </permacrud>
1681         </class>
1682
1683         <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">
1684                 <fields oils_persist:primary="code">
1685                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1686                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1687                 </fields>
1688                 <links/>
1689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1690             <actions>
1691                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1692                 <retrieve/>
1693                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1694                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1695             </actions>
1696         </permacrud>
1697         </class>
1698
1699         <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">
1700                 <fields oils_persist:primary="code">
1701                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1702                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1703                 </fields>
1704                 <links/>
1705         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1706             <actions>
1707                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1708                 <retrieve/>
1709                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1710                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1711             </actions>
1712         </permacrud>
1713         </class>
1714
1715         <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">
1716                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1717                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1718                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1719                 </fields>
1720                 <links/>
1721         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1722             <actions>
1723                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1724                 <retrieve/>
1725                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1726                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1727             </actions>
1728         </permacrud>
1729         </class>
1730
1731         <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">
1732                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1733                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1734                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1735                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1736                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1737                 </fields>
1738         <links>
1739             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1740             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1741             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1742         </links>
1743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1744             <actions>
1745                 <create permission="UPDATE_COPY">
1746                     <context link="target_copy" field="circ_lib"/>
1747                 </create>
1748                 <retrieve/>
1749                 <update permission="UPDATE_COPY">
1750                     <context link="target_copy" field="circ_lib"/>
1751                 </update>
1752                 <delete permission="UPDATE_COPY">
1753                     <context link="target_copy" field="circ_lib"/>
1754                 </delete>
1755             </actions>
1756         </permacrud>
1757         </class>
1758
1759         <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">
1760                 <fields oils_persist:primary="code">
1761                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1762                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1763                 </fields>
1764                 <links/>
1765         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1766             <actions>
1767                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1768                 <retrieve/>
1769                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1770                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1771             </actions>
1772         </permacrud>
1773         </class>
1774
1775         <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">
1776                 <fields oils_persist:primary="code">
1777                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1778                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1779                 </fields>
1780                 <links/>
1781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1782             <actions>
1783                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1784                 <retrieve/>
1785                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1786                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1787             </actions>
1788         </permacrud>
1789         </class>
1790
1791         <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">
1792                 <fields oils_persist:primary="code">
1793                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1794                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1795                 </fields>
1796                 <links/>
1797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1798             <actions>
1799                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1800                 <retrieve/>
1801                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1802                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1803             </actions>
1804         </permacrud>
1805         </class>
1806
1807     <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">
1808         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1809             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1810             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1811             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1812             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1813             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1814             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1815             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1816             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1817             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1818             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1819             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1820             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1821             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1822             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1823             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1824             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1825             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1826         </fields>
1827         <links/>
1828         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1829             <actions>
1830                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1831                 <retrieve/>
1832                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1833                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1834             </actions>
1835         </permacrud>
1836     </class>
1837
1838     <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">
1839         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1840             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1841             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1842             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1843             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1844             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1845             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1846             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1847             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1848             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1849             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1850             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1851             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1852             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1853             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1854             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1855             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1856             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1857             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1858             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1859         </fields>
1860         <links/>
1861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1862             <actions>
1863                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1864                 <retrieve/>
1865                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1866                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1867             </actions>
1868         </permacrud>
1869     </class>
1870
1871     <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">
1872         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1873             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1874             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1875             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1876             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1877             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1878         </fields>
1879         <links>
1880             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1881             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1882             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1883         </links>
1884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1885             <actions>
1886                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1887                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1888                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1889                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1890             </actions>
1891         </permacrud>
1892     </class>
1893
1894         <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">
1895                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1896                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1897                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1898                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1899                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1900                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1901                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1902                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1903                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1904                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1905                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1906                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1907                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1908                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1909                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1910                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1911                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1912             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1913                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1914                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1915                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1916                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1917                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1918                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1919                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1920                 </fields>
1921                 <links>
1922                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1923                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1924                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1925                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1926                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1927                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1928                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1929                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1930                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1931                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1932                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1933                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1934                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1935             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1936                 </links>
1937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1938             <actions>
1939                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1940                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1941                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1942                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1943             </actions>
1944         </permacrud>
1945         </class>
1946
1947         <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">
1948                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1949                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1950                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1951                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1952                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1953                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1954                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1955                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1956                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1957                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1958                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1959                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1960                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1961                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1962                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1963                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1964             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1965                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1966                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1967             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1968                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1969                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1970                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1971                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1972             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1973             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1974             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1975                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1976                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1977                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1978                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1979                 </fields>
1980                 <links>
1981                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1982                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1983                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1984                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1985                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1986                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1987                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1988                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1989                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1990                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1991                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1992                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1993                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1994                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1995             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1996                 </links>
1997         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1998             <actions>
1999                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2000                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2001                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2002                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2003             </actions>
2004         </permacrud>
2005         </class>
2006
2007     <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">
2008         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2009             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2010             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2011             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2012         </fields>
2013         <links/>
2014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2015             <actions>
2016                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2017                 <retrieve/>
2018                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2019                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2020             </actions>
2021         </permacrud>
2022     </class>
2023
2024     <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">
2025         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2026             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2027             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2028             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2029             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2030             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2031             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2032             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2033         </fields>
2034         <links>
2035             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2036         </links>
2037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2038             <actions>
2039                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2040                 <retrieve/>
2041                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2042                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2043             </actions>
2044         </permacrud>
2045     </class>
2046
2047     <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">
2048         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2049             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2050             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2051             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2052             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2053             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2054         </fields>
2055         <links>
2056             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2057             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2058         </links>
2059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2060             <actions>
2061                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2062                     <context link="matchpoint" field="org_unit"/>
2063                 </create>
2064                 <retrieve/>
2065                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2066                     <context link="matchpoint" field="org_unit"/>
2067                 </update>
2068                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2069                     <context link="matchpoint" field="org_unit"/>
2070                 </delete>
2071             </actions>
2072         </permacrud>
2073     </class>
2074
2075     <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">
2076         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2077             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2078             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2079             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2080         </fields>
2081         <links>
2082             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2083             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2084         </links>
2085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2086             <actions>
2087                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2088                     <context link="limit_set" field="owning_lib"/>
2089                 </create>
2090                 <retrieve/>
2091                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2092                     <context link="limit_set" field="owning_lib"/>
2093                 </update>
2094                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2095                     <context link="limit_set" field="owning_lib"/>
2096                 </delete>
2097             </actions>
2098         </permacrud>
2099     </class>
2100     <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">
2101         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2102             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2103             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2104             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2105         </fields>
2106         <links>
2107             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2108             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2109         </links>
2110         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2111             <actions>
2112                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2113                     <context link="limit_set" field="owning_lib"/>
2114                 </create>
2115                 <retrieve/>
2116                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2117                     <context link="limit_set" field="owning_lib"/>
2118                 </update>
2119                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2120                     <context link="limit_set" field="owning_lib"/>
2121                 </delete>
2122             </actions>
2123         </permacrud>
2124     </class>
2125
2126     <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">
2127         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2128             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2129             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2130             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2131             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2132         </fields>
2133         <links>
2134             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2135             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2136         </links>
2137         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2138             <actions>
2139                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2140                     <context link="limit_set" field="owning_lib"/>
2141                 </create>
2142                 <retrieve/>
2143                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2144                     <context link="limit_set" field="owning_lib"/>
2145                 </update>
2146                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2147                     <context link="limit_set" field="owning_lib"/>
2148                 </delete>
2149             </actions>
2150         </permacrud>
2151     </class>
2152
2153         <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">
2154                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2155                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2156                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2157                 </fields>
2158                 <links/>
2159         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2160             <actions>
2161                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2162                 <retrieve/>
2163                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2164                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2165             </actions>
2166         </permacrud>
2167         </class>
2168
2169         <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">
2170                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2171                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2172                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2173                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2174                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2175                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2176                 </fields>
2177                 <links>
2178                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2179                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2180                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2181                 </links>
2182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2183             <actions>
2184                 <create permission="ADMIN_SURVEY">
2185                     <context link="survey" field="owner"/>
2186                 </create>
2187                 <retrieve/>
2188                 <update permission="ADMIN_SURVEY">
2189                     <context link="survey" field="owner"/>
2190                 </update>
2191                 <delete permission="ADMIN_SURVEY">
2192                     <context link="survey" field="owner"/>
2193                 </delete>
2194             </actions>
2195         </permacrud>
2196         </class>
2197         <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">
2198                 <fields oils_persist:primary="id" oils_persist:sequence="">
2199                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2200                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2201                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2202                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2203                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2204                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2205                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2206                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2207                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2208                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2209                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2210                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2211                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2212                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2213                 </fields>
2214                 <links>
2215                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2216                 </links>
2217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2218                         <actions>
2219                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2220                                         <context link="usr" field="home_ou" />
2221                                 </retrieve>
2222                         </actions>
2223                 </permacrud>
2224         </class>
2225         <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">
2226                 <fields oils_persist:primary="id" oils_persist:sequence="">
2227                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2228                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2229                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2230                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2231                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2232                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2233                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2234                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2235                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2236                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2237                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2238                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2239                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2240                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2241                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2242                 </fields>
2243                 <links>
2244                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2245                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2246                 </links>
2247         </class>
2248         <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">
2249                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2250                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2251                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2252                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2253                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2254                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2255                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2256                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2257                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2258                 </fields>
2259                 <links>
2260                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2261                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2262                 </links>
2263                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2264                         <actions> <!-- created magically, so no create action -->
2265                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2266                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2267                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2268                         </actions>
2269                 </permacrud>
2270         </class>
2271         <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)">
2272                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2273                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2274                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2275                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2276                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2277                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2278                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2279                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2280                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2281                 </fields>
2282                 <links>
2283                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2284                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2285                 </links>
2286                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2287                         <actions> <!-- created magically, so no create action -->
2288                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2289                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2290                         </actions>
2291                 </permacrud>
2292         </class>
2293         <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">
2294                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2295                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2296                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2297                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2298                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2299                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2300                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2301                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2302                 </fields>
2303                 <links>
2304                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2305                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2306                 </links>
2307         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2308             <actions>
2309                 <create permission="UPDATE_USER" context_field="owner">
2310                     <context link="usr" field="home_ou"/>
2311                 </create>
2312                                 <!-- note: public notes are still accessible via API -->
2313                 <retrieve permission="UPDATE_USER">
2314                     <context link="usr" field="home_ou"/>
2315                                 </retrieve>
2316                 <update permission="UPDATE_USER">
2317                     <context link="usr" field="home_ou"/>
2318                                 </update>
2319                 <delete permission="UPDATE_USER">
2320                     <context link="usr" field="home_ou"/>
2321                                 </delete>
2322             </actions>
2323         </permacrud>
2324         </class>
2325         <class id="aupw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_privacy_waiver" oils_persist:tablename="actor.usr_privacy_waiver" reporter:label="Privacy Waiver">
2326                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_privacy_waiver_id_seq">
2327                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2328                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2329                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2330                         <field reporter:label="Place Holds?" name="place_holds" reporter:datatype="bool" />
2331                         <field reporter:label="Pick Up Holds?" name="pickup_holds" reporter:datatype="bool" />
2332                         <field reporter:label="View Borrowing History?" name="view_history" reporter:datatype="bool" />
2333                         <field reporter:label="Check Out Items?" name="checkout_items" reporter:datatype="bool" />
2334                 </fields>
2335                 <links>
2336                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2337                 </links>
2338                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2339                         <actions>
2340                                 <create permission="UPDATE_USER">
2341                                         <context link="usr" field="home_ou"/>
2342                                 </create>
2343                                 <retrieve permission="VIEW_USER">
2344                                         <context link="usr" field="home_ou"/>
2345                                 </retrieve>
2346                                 <update permission="UPDATE_USER">
2347                                         <context link="usr" field="home_ou"/>
2348                                 </update>
2349                                 <delete permission="UPDATE_USER">
2350                                         <context link="usr" field="home_ou"/>
2351                                 </delete>
2352                         </actions>
2353                 </permacrud>
2354         </class>
2355         <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">
2356                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2357                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2358                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2359                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2360                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2361                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2362                 </fields>
2363                 <links>
2364                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2365                 </links>
2366         </class>
2367         <class id="aus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2368                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2369                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2370                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2371                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2372                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2373                 </fields>
2374                 <links>
2375                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2376                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2377                 </links>
2378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2379                         <actions>
2380                                 <retrieve permission="VIEW_USER">
2381                                         <context link="usr" field="home_ou" />
2382                                 </retrieve>
2383                         </actions>
2384                 </permacrud>
2385         </class>
2386         <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">
2387                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2388                         <field name="field" reporter:datatype="link"/>
2389                         <field name="id" reporter:datatype="id" />
2390                         <field name="source" reporter:datatype="link"/>
2391                         <field name="value" reporter:datatype="text"/>
2392                 </fields>
2393                 <links>
2394                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2395                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2396                 </links>
2397         </class>
2398         <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">
2399                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2400                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2401                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2402                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2403                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2404                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2405                 </fields>
2406                 <links>
2407                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2408                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2409                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2410                 </links>
2411                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2412                         <actions>
2413                                 <retrieve/>
2414                         </actions>
2415                 </permacrud>
2416         </class>
2417         <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">
2418                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2419                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2420                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2421                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2422                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2423                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2424                 </fields>
2425                 <links>
2426                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2427                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2428                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2429                 </links>
2430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2431                         <actions>
2432                                 <retrieve/>
2433                         </actions>
2434                 </permacrud>
2435         </class>
2436         <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">
2437                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2438                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2439                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2440                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2441                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2442                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2443                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2444                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2445                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2446                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2447                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2448                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2449                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2450                 </fields>
2451                 <links>
2452                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2453                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2454                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2455                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2456                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2457                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2458                 </links>
2459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2460             <actions>
2461                 <create permission="TRANSIT_COPY" context_field="owner">
2462                     <context link="target_copy" field="circ_lib"/>
2463                 </create>
2464                 <retrieve/>
2465                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2466                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2467             </actions>
2468         </permacrud>
2469         </class>
2470         <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">
2471                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2472                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2473                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2474                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2475                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2476                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2477                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2478                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2479                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2480                 </fields>
2481                 <links>
2482                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2483                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2484                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2485                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2486                 </links>
2487         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2488             <actions>
2489                 <create permission="ADMIN_SURVEY">
2490                     <context link="survey" field="owner"/>
2491                 </create>
2492                 <retrieve permission="VIEW_USER">
2493                     <context link="usr" field="home_ou"/>
2494                 </retrieve>
2495                 <update permission="ADMIN_SURVEY">
2496                     <context link="survey" field="owner"/>
2497                 </update>
2498                 <delete permission="ADMIN_SURVEY">
2499                     <context link="survey" field="owner"/>
2500                 </delete>
2501             </actions>
2502         </permacrud>
2503         </class>
2504         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2505                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2506                         <field name="bucket" />
2507                         <field name="id" reporter:datatype="id" />
2508                         <field name="target_copy" reporter:datatype="link"/>
2509                         <field name="create_time" reporter:datatype="timestamp" />
2510                         <field name="pos" reporter:datatype="int" />
2511                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2512                 </fields>
2513                 <links>
2514                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2515                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2516             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2517                 </links>
2518                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2519                         <actions>
2520                                 <retrieve permission="ADMIN_COPY_BUCKET">
2521                     <context link="bucket" owning_lib="owning_lib"/>
2522                 </retrieve>
2523             </actions>
2524         </permacrud>
2525         </class>
2526         <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">
2527                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2528                         <field name="id" reporter:datatype="id" />
2529                         <field name="item" reporter:datatype="link"/>
2530                         <field name="note" reporter:datatype="text" />
2531                 </fields>
2532                 <links>
2533                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2534                 </links>
2535         </class>
2536
2537         <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">
2538                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2539                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2540                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2541                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2542                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2543                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2544                 </fields>
2545                 <links>
2546                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2547                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2548                 </links>
2549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2550                         <actions>
2551                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2552                                 <retrieve/>
2553                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2554                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2555                         </actions>
2556                 </permacrud>
2557         </class>
2558
2559         <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">
2560                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2561                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2562                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2563                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2564                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2565                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2566                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2567                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2568                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2569                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2570                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2571                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2572                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2573                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2574                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2575                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2576                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2577                 </fields>
2578                 <links>
2579                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2580                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2581                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2582                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2583                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2584                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2585                         <link field="heading_field" reltype="has_a" key="id" map="" class="ahf"/>
2586                 </links>
2587                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2588                         <actions>
2589                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2590                                 <retrieve/>
2591                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2592                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2593                         </actions>
2594                 </permacrud>
2595         </class>
2596
2597         <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">
2598                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2599                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2600                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2601                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2602                 </fields>
2603                 <links>
2604                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2605                 </links>
2606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2607                         <actions>
2608                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2609                                 <retrieve/>
2610                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2611                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2612                         </actions>
2613                 </permacrud>
2614         </class>
2615
2616         <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">
2617                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2618                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2619                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2620                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2621                 </fields>
2622                 <links>
2623                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2624                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2625                 </links>
2626                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2627                         <actions>
2628                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2629                                 <retrieve/>
2630                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2631                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2632                         </actions>
2633                 </permacrud>
2634         </class>
2635
2636         <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">
2637                 <fields oils_persist:primary="code">
2638                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2639                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2640                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2641                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2642                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2643                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2644                 </fields>
2645                 <links>
2646                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2647                 </links>
2648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2649                         <actions>
2650                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2651                                 <retrieve/>
2652                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2653                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2654                         </actions>
2655                 </permacrud>
2656         </class>
2657
2658         <class id="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">
2659                 <fields oils_persist:primary="code">
2660                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2661                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2662                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2663                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2664                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2665                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2666                 </fields>
2667                 <links>
2668                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2669                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2670                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2671                 </links>
2672                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2673                         <actions>
2674                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2675                                 <retrieve/>
2676                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2677                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2678                         </actions>
2679                 </permacrud>
2680         </class>
2681
2682     <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">
2683         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2684             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2685             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2686             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2687         </fields>
2688         <links>
2689             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2690             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2691         </links>
2692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2693             <actions>
2694                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2695                 <retrieve/>
2696                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2697                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2698             </actions>
2699         </permacrud>
2700     </class>
2701
2702         <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">
2703                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2704                         <field name="active" reporter:datatype="bool"/>
2705                         <field name="create_date" reporter:datatype="timestamp"/>
2706                         <field name="creator" />
2707                         <field name="deleted" reporter:datatype="bool"/>
2708                         <field name="edit_date" reporter:datatype="timestamp"/>
2709                         <field name="editor" />
2710                         <field name="id" reporter:datatype="id" />
2711                         <field name="last_xact_id" />
2712                         <field name="marc" />
2713                         <field name="source" />
2714                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2715                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2716                         <field name="heading" />
2717                         <field name="simple_heading" />
2718                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2719                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2720                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2721                 </fields>
2722                 <links>
2723                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2724                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2725                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2726                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2727                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2728                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2729                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2730                 </links>
2731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2732                         <actions>
2733                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2734                                 <retrieve/>
2735                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2736                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2737                         </actions>
2738                 </permacrud>
2739         </class>
2740         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2741                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2742                         <field name="char_encoding" />
2743                         <field name="id" />
2744                         <field name="record" />
2745                         <field name="record_status" />
2746                         <field name="thesaurus" />
2747                 </fields>
2748                 <links>
2749                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2750                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2751                 </links>
2752         </class>
2753         <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">
2754                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2755                         <field name="id" reporter:datatype="id" />
2756                         <field name="bib" reporter:datatype="link" />
2757                         <field name="authority" reporter:datatype="link" />
2758                 </fields>
2759                 <links>
2760                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2761                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2762                 </links>
2763         </class>
2764         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2765                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2766                         <field name="id" reporter:datatype="id" />
2767                         <field name="record" reporter:datatype="link" />
2768                         <field name="atag" reporter:datatype="link" />
2769                         <field name="value" reporter:datatype="text" />
2770                 </fields>
2771                 <links>
2772                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2773                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2774                 </links>
2775         </class>
2776
2777         <class id="ahf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::heading_field" oils_persist:tablename="authority.heading_field" reporter:label="Authority Heading Fields">
2778                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2779                         <field name="id" reporter:datatype="id" reporter:selector="label" />
2780                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2781                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2782                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2783                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2784                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2785                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2786                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2787                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2788                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2789                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2790                 </fields>
2791                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2792                         <actions>
2793                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2794                                 <retrieve/>
2795                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2796                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2797                         </actions>
2798                 </permacrud>
2799         </class>
2800
2801         <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">
2802                 <fields oils_persist:primary="code" oils_persist:sequence="">
2803                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2804                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2805                 </fields>
2806                 <links/>
2807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2808             <actions>
2809                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2810                 <retrieve/>
2811                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2812                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2813             </actions>
2814         </permacrud>
2815         </class>
2816         <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">
2817                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2818                         <field name="accepting_usr" />
2819                         <field name="amount" reporter:datatype="money" />
2820                         <field name="amount_collected" reporter:datatype="money" />
2821                         <field name="approval_code" reporter:datatype="text"/>
2822                         <field name="cash_drawer" reporter:datatype="link"/>
2823                         <field name="cc_number" reporter:datatype="text"/>
2824                         <field name="cc_order_number" reporter:datatype="text"/>
2825                         <field name="cc_processor" reporter:datatype="text"/>
2826                         <field name="id" reporter:datatype="id" />
2827                         <field name="note" reporter:datatype="text"/>
2828                         <field name="payment_ts" reporter:datatype="timestamp"/>
2829                         <field name="xact" reporter:datatype="link"/>
2830                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2831                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2832                 </fields>
2833                 <links>
2834                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2835                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2836                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2837                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2838                 </links>
2839         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2840             <actions>
2841                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2842                     <context link="xact" jump="usr" field="home_ou"/>
2843                 </retrieve>
2844                         </actions>
2845                 </permacrud>
2846         </class>
2847         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition" oils_persist:field_safe="true">
2848                 <fields oils_persist:primary="name">
2849                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2850                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2851                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2852                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2853                 </fields>
2854                 <links/>
2855         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2856             <actions>
2857                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2858                 <retrieve/>
2859                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2860                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2861             </actions>
2862         </permacrud>
2863         </class>
2864
2865         <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">
2866                 <fields oils_persist:primary="alias">
2867                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2868                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2869                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2870                 </fields>
2871                 <links>
2872                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2873                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2874                 </links>
2875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2876             <actions>
2877                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2878                 <retrieve/>
2879                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2880                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2881             </actions>
2882         </permacrud>
2883         </class>
2884
2885         <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">
2886                 <fields oils_persist:primary="name">
2887                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2888                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2889                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2890                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2891                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2892                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2893                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2894                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2895                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2896                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2897                 </fields>
2898                 <links>
2899                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2900                 </links>
2901         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2902             <actions>
2903                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2904                 <retrieve/>
2905                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2906                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2907             </actions>
2908         </permacrud>
2909         </class>
2910
2911         <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">
2912                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2913                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2914                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2915                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2916                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2917                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2918                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2919                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2920                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2921                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2922                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2923                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2924                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2925                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2926                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2927                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2928                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2929                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2930                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2931                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2932                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
2933                 </fields>
2934                 <links>
2935                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
2936                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2937                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
2938                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
2939                 </links>
2940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2941             <actions>
2942                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2943                 <retrieve/>
2944                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2945                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2946             </actions>
2947         </permacrud>
2948         </class>
2949
2950         <class id="cmfvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_virtual_map" oils_persist:tablename="config.metabib_field_virtual_map" reporter:label="Metabib Field Virtual Map" oils_persist:field_safe="true">
2951                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
2952                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2953                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
2954                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link" config_field="true"/>
2955                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
2956                 </fields>
2957                 <links>
2958                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
2959                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
2960                 </links>
2961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2962             <actions>
2963                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2964                 <retrieve/>
2965                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2966                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2967             </actions>
2968         </permacrud>
2969         </class>
2970
2971         <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">
2972                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2973                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2974                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2975                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2976                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2977                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2978                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2979                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2980                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2981                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2982                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2983                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2984                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2985                 </fields>
2986                 <links>
2987                 </links>
2988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2989                         <actions>
2990                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2991                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2992                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2993                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2994                         </actions>
2995                 </permacrud>
2996         </class>
2997         <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
2998                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2999                         <field name="id" reporter:datatype="id" />
3000                         <field name="name" reporter:datatype="text"/>
3001                         <field name="xpath" reporter:datatype="text"/>
3002                         <field name="format" reporter:datatype="link"/>
3003                         <field name="first_word" reporter:datatype="bool" />
3004                 </fields>
3005                 <links/>
3006         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3007             <actions>
3008                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
3009                 <retrieve/>
3010                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
3011                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
3012             </actions>
3013         </permacrud>
3014         </class>
3015         <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">
3016                 <fields oils_persist:primary="code" oils_persist:sequence="">
3017                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3018                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
3019                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3020                 </fields>
3021                 <links/>
3022         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3023             <actions>
3024                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3025                 <retrieve/>
3026                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3027                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3028             </actions>
3029         </permacrud>
3030         </class>
3031         <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">
3032                 <fields oils_persist:primary="code" oils_persist:sequence="">
3033                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3034                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3035                 </fields>
3036                 <links/>
3037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3038             <actions>
3039                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3040                 <retrieve/>
3041                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3042                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3043             </actions>
3044         </permacrud>
3045         </class>
3046     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
3047         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3048             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3049             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3050             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3051             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3052         </fields>
3053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3054             <actions>
3055                 <retrieve/>
3056             </actions>
3057         </permacrud>
3058     </class>
3059         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
3060                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3061                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3062                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3063                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3064                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3065                 </fields>
3066                 <links>
3067                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3068                 </links>
3069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3070             <actions>
3071                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3072                 <retrieve/>
3073                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3074                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3075             </actions>
3076         </permacrud>
3077         </class>
3078         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
3079                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3080                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3081                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3082                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3083                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3084                 </fields>
3085                 <links>
3086                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3087                 </links>
3088         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3089             <actions>
3090                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3091                 <retrieve/>
3092                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3093                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3094             </actions>
3095         </permacrud>
3096         </class>
3097         <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">
3098                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3099                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3100                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3101                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3102                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3103                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3104                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3105                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3106                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3107                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3108                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3109                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3110                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3111                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3112                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3113                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3114                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3115                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3116                 </fields>
3117                 <links>
3118                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3119                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3120                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3121                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3122                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3123                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3124                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3125                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3126                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3127                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3128                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3129                 </links>
3130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3131             <actions>
3132                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3133                 <retrieve/>
3134                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3135                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3136             </actions>
3137         </permacrud>
3138         </class>
3139         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3140                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3141                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3142                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3143                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3144                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3145                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3146                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3147                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3148                 </fields>
3149                 <links>
3150                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3151                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3152         </links>
3153         </class>
3154         <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">
3155                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3156                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3157                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3158                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3159                 </fields>
3160                 <links>
3161                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3162                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3163                 </links>
3164         </class>
3165         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3166                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3167                         <field name="id" reporter:datatype="id" />
3168                         <field name="value" oils_persist:i18n="true" />
3169                 </fields>
3170                 <links/>
3171         </class>
3172         <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
3173                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3174                         <field name="balance_owed" reporter:datatype="money" />
3175                         <field name="total_owed" reporter:datatype="money" />
3176                         <field name="total_paid" reporter:datatype="money" />
3177                         <field name="usr" reporter:datatype="link"/>
3178                 </fields>
3179                 <links>
3180                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3181         </links>
3182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3183             <actions>
3184                 <retrieve permission="VIEW_USER">
3185                     <context link="usr" field="home_ou"/>
3186                 </retrieve>
3187             </actions>
3188         </permacrud>
3189         </class>
3190         <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">
3191                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3192                         <field name="collector" />
3193                         <field name="enter_time" reporter:datatype="timestamp"/>
3194                         <field name="id" reporter:datatype="id" />
3195                         <field name="location" reporter:datatype="link"/>
3196                         <field name="usr" reporter:datatype="link"/>
3197                 </fields>
3198                 <links>
3199                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3200                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3201                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3202                 </links>
3203         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3204             <actions>
3205                 <create permission="money.collections_tracker.create" context_field="location"/>
3206                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3207                 <delete permission="money.collections_tracker.create" context_field="location"/>
3208             </actions>
3209         </permacrud>
3210         </class>
3211         <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">
3212                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3213                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3214                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3215                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3216                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3217                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3218                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3219                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3220                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3221                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3222                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3223                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3224                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3225                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3226                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3227                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3228                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3229                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3230                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3231                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3232                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3233                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3234                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3235                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3236                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3237                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3238                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3239                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3240                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3241                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3242                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3243                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3244                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3245                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3246                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3247                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3248                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3249                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3250                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3251                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3252                 </fields>
3253                 <links>
3254                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3255                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3256                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3257                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3258                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3259                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3260                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3261                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3262                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3263                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3264                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3265                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3266                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3267                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3268                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3269                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3270                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3271                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3272                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3273                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3274                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3275                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3276                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3277                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3278                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3279                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3280                 </links>
3281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3282             <actions>
3283                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3284                 <retrieve/>
3285                 <update permission="UPDATE_MARC" global_required="true"/>
3286                 <!-- WARNING: Deleting records via PCRUD does NOT check that any prerequisite conditions have been handled first. It is your responsibility to check for those conditions before deleting bib records. -->
3287                 <delete permission="DELETE_RECORD" global_required="true"/>
3288             </actions>
3289         </permacrud>
3290         </class>
3291         <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">
3292                 <fields oils_persist:primary="id">
3293                         <field name="dow_0_close" />
3294                         <field name="dow_0_open" />
3295                         <field name="dow_1_close" />
3296                         <field name="dow_1_open" />
3297                         <field name="dow_2_close" />
3298                         <field name="dow_2_open" />
3299                         <field name="dow_3_close" />
3300                         <field name="dow_3_open" />
3301                         <field name="dow_4_close" />
3302                         <field name="dow_4_open" />
3303                         <field name="dow_5_close" />
3304                         <field name="dow_5_open" />
3305                         <field name="dow_6_close" />
3306                         <field name="dow_6_open" />
3307                         <field name="id" reporter:datatype="id" />
3308                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3309                 </fields>
3310                 <links>
3311                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3312                 </links>
3313         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3314             <actions>
3315                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3316                 <retrieve/>
3317                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3318                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3319             </actions>
3320         </permacrud>
3321         </class>
3322         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
3323                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3324                         <field name="id" reporter:datatype="id" />
3325                         <field name="record" reporter:datatype="link"/>
3326                         <field name="label" reporter:datatype="text"/>
3327                         <field name="label_sortkey" reporter:datatype="text"/>
3328                         <field name="deleted" reporter:datatype="bool"/>
3329                 </fields>
3330                 <links>
3331                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3332                 </links>
3333         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3334             <actions>
3335                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3336                 <retrieve/>
3337                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3338                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3339             </actions>
3340         </permacrud>
3341         </class>
3342         <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
3343                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3344                         <field name="id" reporter:datatype="id" />
3345                         <field name="target_copy" reporter:datatype="link" />
3346                         <field name="part" reporter:datatype="link"/>
3347                 </fields>
3348                 <links>
3349                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3350                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3351                 </links>
3352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3353             <actions>
3354                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3355                 <retrieve/>
3356                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3357                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3358             </actions>
3359         </permacrud>
3360         </class>
3361     <class  id="aecc"
3362             controller="open-ils.cstore open-ils.pcrud"
3363             oils_obj:fieldmapper="action::emergency_closing_circulation"
3364             oils_persist:tablename="action.emergency_closing_circulation"
3365             reporter:label="Emergency Closing Circulation Entry"
3366             oils_persist:readonly="true"
3367     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3368         <fields oils_persist:primary="id">
3369             <field name="id" reporter:datatype="id" />
3370             <field name="circulation" reporter:datatype="link" />
3371                         <field name="emergency_closing" reporter:datatype="link"/>
3372             <field name="original_due_date" reporter:datatype="timestamp" />
3373             <field name="process_time" reporter:datatype="timestamp" />
3374         </fields>
3375         <links>
3376             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3377             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3378         </links>
3379         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3380             <actions>
3381                 <retrieve/>
3382             </actions>
3383         </permacrud>
3384     </class>
3385     <class  id="aecr"
3386             controller="open-ils.cstore open-ils.pcrud"
3387             oils_obj:fieldmapper="action::emergency_closing_reservation"
3388             oils_persist:tablename="action.emergency_closing_reservation"
3389             reporter:label="Emergency Closing Reservation Entry"
3390             oils_persist:readonly="true"
3391     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3392         <fields oils_persist:primary="id">
3393             <field name="id" reporter:datatype="id" />
3394             <field name="reservation" reporter:datatype="link" />
3395                         <field name="emergency_closing" reporter:datatype="link"/>
3396             <field name="original_end_time" reporter:datatype="timestamp" />
3397             <field name="process_time" reporter:datatype="timestamp" />
3398         </fields>
3399         <links>
3400             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3401             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3402         </links>
3403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3404             <actions>
3405                 <retrieve/>
3406             </actions>
3407         </permacrud>
3408     </class>
3409     <class  id="aech"
3410             controller="open-ils.cstore open-ils.pcrud"
3411             oils_obj:fieldmapper="action::emergency_closing_hold"
3412             oils_persist:tablename="action.emergency_closing_hold"
3413             reporter:label="Emergency Closing Hold Entry"
3414             oils_persist:readonly="true"
3415     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3416         <fields oils_persist:primary="id">
3417             <field name="id" reporter:datatype="id" />
3418             <field name="hold" reporter:datatype="link" />
3419                         <field name="emergency_closing" reporter:datatype="link"/>
3420             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3421             <field name="process_time" reporter:datatype="timestamp" />
3422         </fields>
3423         <links>
3424             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3425             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3426         </links>
3427         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3428             <actions>
3429                 <retrieve/>
3430             </actions>
3431         </permacrud>
3432     </class>
3433     <class  id="aecs"
3434             controller="open-ils.cstore open-ils.pcrud"
3435             oils_obj:fieldmapper="action::emergency_closing_status"
3436             oils_persist:tablename="action.emergency_closing_status"
3437             reporter:label="Emergency Closing Status"
3438             oils_persist:readonly="true"
3439     >
3440         <fields oils_persist:primary="id">
3441             <field name="id" reporter:datatype="id" />
3442             <field name="creator" reporter:datatype="link" />
3443             <field name="create_time" reporter:datatype="timestamp" />
3444             <field name="process_start_time" reporter:datatype="timestamp" />
3445             <field name="process_end_time" reporter:datatype="timestamp" />
3446             <field name="last_update_time" reporter:datatype="timestamp" />
3447             <field name="circulations" reporter:datatype="int" />
3448             <field name="circulations_complete" reporter:datatype="int" />
3449             <field name="reservations" reporter:datatype="int" />
3450             <field name="reservations_complete" reporter:datatype="int" />
3451             <field name="holds" reporter:datatype="int" />
3452             <field name="holds_complete" reporter:datatype="int" />
3453         </fields>
3454         <links>
3455             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3456         </links>
3457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3458             <actions>
3459                 <retrieve/>
3460             </actions>
3461         </permacrud>
3462     </class>
3463     <class id="aec" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::emergency_closing" oils_persist:tablename="action.emergency_closing" reporter:label="Emergency Closing">
3464         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3465             <field name="id" reporter:datatype="id" />
3466             <field name="creator" reporter:datatype="link" />
3467             <field name="create_time" reporter:datatype="timestamp" />
3468             <field name="process_start_time" reporter:datatype="timestamp" />
3469             <field name="process_end_time" reporter:datatype="timestamp" />
3470             <field name="last_update_time" reporter:datatype="timestamp" />
3471             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3472             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3473             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3474             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3475             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3476         </fields>
3477         <links>
3478             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3479             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3480             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3481             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3482             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3483             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3484         </links>
3485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3486             <actions>
3487                 <create permission="EMERGENCY_CLOSING">
3488                     <context link="closing" field="org_unit" />
3489                 </create>
3490                 <retrieve/>
3491                 <update permission="EMERGENCY_CLOSING">
3492                     <context link="closing" field="org_unit" />
3493                 </update>
3494                 <delete permission="EMERGENCY_CLOSING">
3495                     <context link="closing" field="org_unit" />
3496                 </delete>
3497             </actions>
3498         </permacrud>
3499     </class>
3500         <class id="aoucd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::closed_date" oils_persist:tablename="actor.org_unit_closed" reporter:label="Closed Dates">
3501                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3502                         <field name="close_end" reporter:datatype="timestamp" />
3503                         <field name="close_start" reporter:datatype="timestamp" />
3504                         <field name="id" reporter:datatype="id" />
3505                         <field name="org_unit" reporter:datatype="org_unit"/>
3506                         <field name="reason" reporter:datatype="text"/>
3507                         <field name="full_day" reporter:datatype="bool"/>
3508                         <field name="multi_day" reporter:datatype="bool"/>
3509                         <field name="emergency_closing" reporter:datatype="link"/>
3510                 </fields>
3511                 <links>
3512                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3513                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3514                 </links>
3515         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3516             <actions>
3517                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3518                 <retrieve/>
3519                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3520                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3521             </actions>
3522         </permacrud>
3523         </class>
3524         <class id="crcd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::circ_duration" oils_persist:tablename="config.rule_circ_duration" reporter:label="Circulation Duration Rule">
3525                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3526                         <field name="extended" reporter:datatype="interval"/>
3527                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3528                         <field name="max_renewals" reporter:datatype="int" />
3529                         <field name="name" reporter:datatype="text"/>
3530                         <field name="normal" reporter:datatype="interval"/>
3531                         <field name="shrt" reporter:datatype="interval"/>
3532                         <field name="max_auto_renewals" reporter:datatype="int" />
3533                 </fields>
3534                 <links>
3535                 </links>
3536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3537             <actions>
3538                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3539                 <retrieve/>
3540                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3541                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3542             </actions>
3543         </permacrud>
3544         </class>
3545
3546         <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">
3547                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3548                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3549                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3550             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3551                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3552             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3553                         <field reporter:label="Values" name="values" oils_persist:virtual="true" 
3554                                 reporter:datatype="link" config_field="true"/>
3555                 </fields>
3556                 <links>
3557             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3558                         <link field="values" reltype="has_many" key="hard_due_date" map="" class="chddv"/>
3559                 </links>
3560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3561             <actions>
3562                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3563                 <retrieve/>
3564                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3565                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3566             </actions>
3567                 </permacrud>
3568         </class>
3569
3570         <class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">
3571                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3572                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3573                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link" config_field="true"/>
3574                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3575             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3576                 </fields>
3577                 <links>
3578                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3579                 </links>
3580                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3581             <actions>
3582                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3583                 <retrieve/>
3584                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3585                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3586             </actions>
3587                 </permacrud>
3588         </class>
3589
3590         <class id="mobts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
3591                 <fields oils_persist:primary="id" oils_persist:sequence="">
3592                         <field name="balance_owed" reporter:datatype="money"/>
3593                         <field name="id" reporter:datatype="id" />
3594                         <field name="last_billing_note" reporter:datatype="text"/>
3595                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3596                         <field name="last_billing_type" reporter:datatype="text"/>
3597                         <field name="last_payment_note" reporter:datatype="text"/>
3598                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3599                         <field name="last_payment_type" reporter:datatype="text"/>
3600                         <field name="total_owed" reporter:datatype="money"/>
3601                         <field name="total_paid" reporter:datatype="money"/>
3602                         <field name="usr" reporter:datatype="link"/>
3603                         <field name="xact_finish" reporter:datatype="timestamp" />
3604                         <field name="xact_start" reporter:datatype="timestamp" />
3605                         <field name="xact_type" reporter:datatype="text"/>
3606                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3607                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3608                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3609                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3610                         <field name="billing_location" reporter:datatype="link"/>
3611                 </fields>
3612                 <links>
3613                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3614                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3615                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3616                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3617                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3618                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3619                 </links>
3620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3621                         <actions>
3622                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3623                                         <context link="usr" field="home_ou" />
3624                                 </retrieve>
3625                         </actions>
3626                 </permacrud>
3627         </class>
3628         <class id="au" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
3629                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3630                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3631                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3632                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3633                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3634                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3635                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3636                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3637                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3638                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3639                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3640                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3641                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3642                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3643                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3644                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3645                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3646                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3647                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3648                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3649                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3650                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3651                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3652                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3653                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3654                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3655                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3656                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3657                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3658                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3659                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
3660                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3661                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3662                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3663                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3664                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3665                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3666                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3667                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3668                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3669                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3670                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3671                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3672                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3673                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3674                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3675                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3676                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3677                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3678                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3679                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3680                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3681                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3682                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3683                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3684                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3685                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3686                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3687                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
3688                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3689                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3690                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3691                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3692                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3693                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3694                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3695                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3696                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3697                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3698                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3699                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3700                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3701                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3702                 </fields>
3703                 <links>
3704                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3705                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3706                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3707                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3708                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3709                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3710                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3711                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3712                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3713                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3714                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3715                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
3716                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3717                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3718                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3719                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3720                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3721                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3722                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3723                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3724                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3725                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3726                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3727                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3728                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3729                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3730                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3731                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3732                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3733                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3734                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3735                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3736                 </links>
3737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3738                         <actions>
3739                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
3740                         </actions>
3741                 </permacrud>
3742         </class>
3743         <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
3744                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3745                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
3746                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3747                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3748                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3749                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3750                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3751                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3752                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3753         </fields>
3754                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3755                         <actions>
3756                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3757                                 <retrieve/>
3758                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3759                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3760                         </actions>
3761                 </permacrud>
3762         </class>
3763         <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
3764                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3765                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3766                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3767                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3768                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3769         </fields>
3770         <links>
3771                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3772                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3773                 </links>
3774                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3775                         <actions>
3776                                 <retrieve permission="RUN_REPORTS">
3777                                         <context link="usr" field="home_ou" />
3778                                 </retrieve>
3779                         </actions>
3780                 </permacrud>
3781         </class>
3782         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3783                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3784                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3785                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3786                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3787                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3788                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3789                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3790         </fields>
3791         <links>
3792                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3793                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3794                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3795                 </links>
3796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3797                         <actions>
3798                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3799                                         <context link="usr" field="home_ou" />
3800                                         <context link="ws" field="owning_lib" />
3801                                 </retrieve>
3802                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3803                                         <context link="usr" field="home_ou" />
3804                                         <context link="ws" field="owning_lib" />
3805                                 </create>
3806                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3807                                         <context link="usr" field="home_ou" />
3808                                         <context link="ws" field="owning_lib" />
3809                                 </update>
3810                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3811                                         <context link="usr" field="home_ou" />
3812                                         <context link="ws" field="owning_lib" />
3813                                 </delete>
3814                         </actions>
3815                 </permacrud>
3816         </class>
3817         <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">
3818                 <fields oils_persist:primary="name">
3819                         <field name="name" reporter:datatype="text"/>
3820                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3821                 </fields>
3822                 <links/>
3823                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3824                         <actions>
3825                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3826                                 <retrieve/>
3827                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3828                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3829                         </actions>
3830                 </permacrud>
3831         </class>
3832         <class id="cust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_setting_type" oils_persist:tablename="config.usr_setting_type" reporter:label="User Setting Type">
3833                 <fields oils_persist:primary="name">
3834                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3835                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3836                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3837                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3838                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3839                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3840                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3841                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3842                 </fields>
3843                 <links>
3844                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3845                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3846                 </links>
3847                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3848                         <actions>
3849                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3850                                 <retrieve/>
3851                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3852                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3853                         </actions>
3854                 </permacrud>
3855         </class>
3856         <class id="coust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type" oils_persist:tablename="config.org_unit_setting_type" reporter:label="Organizational Unit Setting Type">
3857                 <fields oils_persist:primary="name">
3858                         <field name="name" reporter:datatype="text"/>
3859                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3860                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3861                         <field name="datatype" reporter:datatype="text"/>
3862                         <field name="view_perm" reporter:datatype="link"/>
3863                         <field name="update_perm" reporter:datatype="link"/>
3864                         <field name="fm_class" reporter:datatype="text"/>
3865                         <field name="grp" reporter:datatype="link"/>
3866                 </fields>
3867                 <links>
3868                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3869                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3870                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3871                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3872                 </links>
3873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3874                         <actions>
3875                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3876                                 <retrieve/>
3877                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3878                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3879                         </actions>
3880                 </permacrud>
3881         </class>
3882         <class id="aous" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_setting" oils_persist:tablename="actor.org_unit_setting" reporter:label="Organizational Unit Setting">
3883                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3884                         <field name="id" />
3885                         <field name="name"  reporter:datatype="text"/>
3886                         <field name="org_unit" reporter:datatype="org_unit"/>
3887                         <field name="value"  reporter:datatype="text"/>
3888                 </fields>
3889                 <links>
3890                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3891                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3892                 </links>
3893         </class>
3894         <class id="acpn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_note" oils_persist:tablename="asset.copy_note" reporter:label="Copy Note">
3895                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3896                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3897                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3898                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3899                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3900                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3901                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3902                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3903                 </fields>
3904                 <links>
3905                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3906                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3907                 </links>
3908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3909             <actions>
3910                 <create permission="CREATE_COPY_NOTE">
3911                     <context link="owning_copy" field="circ_lib"/>
3912                 </create>
3913                 <retrieve permission="VIEW_COPY_NOTES">
3914                     <context link="owning_copy" field="circ_lib"/>
3915                 </retrieve>
3916                 <update permission="UPDATE_COPY_NOTE">
3917                     <context link="owning_copy" field="circ_lib"/>
3918                 </update>
3919                 <delete permission="DELETE_COPY_NOTE">
3920                     <context link="owning_copy" field="circ_lib"/>
3921                 </delete>
3922             </actions>
3923         </permacrud>
3924         </class>
3925         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3926                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3927                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3928                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3929                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3930                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3931                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3932                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3933                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3934                 </fields>
3935                 <links>
3936                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3937                 </links>
3938         </class>
3939         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3940                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3941                         <field name="fingerprint"  reporter:datatype="text"/>
3942                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
3943                         <field name="master_record" reporter:datatype="link"/>
3944                         <field name="mods"  reporter:datatype="text"/>
3945                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3946                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3947                 </fields>
3948                 <links>
3949                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3950                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3951                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
3952                 </links>
3953                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3954                         <actions>
3955                                 <retrieve/>
3956                         </actions>
3957                 </permacrud>
3958         </class>
3959         <class id="cnal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::net_access_level" oils_persist:tablename="config.net_access_level" reporter:label="Net Access Level">
3960                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3961                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3962                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3963                 </fields>
3964                 <links/>
3965         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3966             <actions>
3967                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3968                 <retrieve/>
3969                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3970                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3971             </actions>
3972         </permacrud>
3973         </class>
3974         <class id="ppl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::perm_list" oils_persist:tablename="permission.perm_list" reporter:label="Permission List">
3975                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3976                         <field name="code"  reporter:datatype="text"/>
3977                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3978                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3979                 </fields>
3980                 <links/>
3981         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3982             <actions>
3983                 <create permission="CREATE_PERM" global_required="true"/>
3984                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3985                 <update permission="UPDATE_PERM" global_required="true"/>
3986                 <delete permission="DELETE_PERM" global_required="true"/>
3987             </actions>
3988         </permacrud>
3989         </class>
3990         <class id="mmrsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
3991                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3992                         <field name="id" reporter:datatype="id" />
3993                         <field name="metarecord" reporter:datatype="link"/>
3994                         <field name="source" reporter:datatype="link"/>
3995                 </fields>
3996                 <links>
3997                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3998                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3999                 </links>
4000                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4001                         <actions>
4002                                 <retrieve/>
4003                         </actions>
4004                 </permacrud>
4005         </class>
4006         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4007                         oils_obj:fieldmapper="metabib::display_entry" 
4008                         oils_persist:tablename="metabib.display_entry" 
4009                         oils_persist:field_safe="true"
4010                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4011                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4012                         <field name="id" reporter:datatype="id" />
4013                         <field name="field" reporter:datatype="link"/>
4014                         <field name="source" reporter:datatype="link"/>
4015                         <field name="value"  reporter:datatype="text"/>
4016                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4017                 </fields>
4018                 <links>
4019                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4020                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4021                 </links>
4022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4023                         <actions>
4024                                 <retrieve/>
4025                         </actions>
4026                 </permacrud>
4027         </class>
4028         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4029                 oils_persist:tablename="metabib.flat_display_entry"
4030                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4031                 oils_persist:field_safe="true"
4032                 reporter:label="Flat Display Entry" 
4033                 oils_persist:readonly="true">
4034                 <fields>
4035                         <field name="source" reporter:datatype="id" />
4036                         <field name="name" reporter:datatype="text"/>
4037                         <field name="multi" reporter:datatype="bool"/>
4038                         <field name="label" reporter:datatype="text"/>
4039                         <field name="field" reporter:datatype="link"/>
4040                         <field name="value" reporter:datatype="text"/>
4041                 </fields>
4042                 <links>
4043                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4044                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4045                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4046                 </links>
4047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4048                         <actions>
4049                                 <retrieve/>
4050                         </actions>
4051                 </permacrud>
4052         </class>
4053         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4054                 oils_persist:tablename="metabib.compressed_display_entry"
4055                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4056                 oils_persist:field_safe="true"
4057                 reporter:label="Compressed Display Entry" 
4058                 oils_persist:readonly="true">
4059                 <fields>
4060                         <field name="source" reporter:datatype="id" />
4061                         <field name="name" reporter:datatype="text"/>
4062                         <field name="multi" reporter:datatype="bool"/>
4063                         <field name="label" reporter:datatype="text"/>
4064                         <field name="field" reporter:datatype="link"/>
4065                         <field name="value" reporter:datatype="text"/>
4066                 </fields>
4067                 <links>
4068                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4069                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4070                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4071                 </links>
4072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4073                         <actions>
4074                                 <retrieve/>
4075                         </actions>
4076                 </permacrud>
4077         </class>
4078         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4079                 oils_persist:tablename="metabib.wide_display_entry"
4080                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4081                 oils_persist:field_safe="true"
4082                 reporter:label="Wide Display Entry" 
4083                 oils_persist:readonly="true">
4084                 <fields oils_persist:primary="source">
4085                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4086                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4087                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4088                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4089                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4090                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4091                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4092                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4093                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4094                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4095                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4096                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4097                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4098                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4099                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4100                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4101                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4102                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4103                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4104                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4105                 </fields>
4106                 <links>
4107                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4108                 </links>
4109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4110                         <actions>
4111                                 <retrieve/>
4112                         </actions>
4113                 </permacrud>
4114         </class>
4115
4116         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4117                 oils_persist:tablename="config.display_field_map"
4118                 oils_obj:fieldmapper="config::display_field_map"
4119                 oils_persist:field_safe="true"
4120                 reporter:label="Display Field Map">
4121                 <fields oils_persist:primary="name">
4122                         <field name="name" reporter:datatype="text"/>
4123                         <field name="field" reporter:datatype="link"/>
4124                         <field name="multi" reporter:datatype="bool"/>
4125                 </fields>
4126                 <links>
4127                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4128                 </links>
4129                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4130                         <actions>
4131                                 <retrieve/>
4132                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4133                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4134                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4135                         </actions>
4136                 </permacrud>
4137         </class>
4138
4139         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" oils_persist:tablename="metabib.facet_entry" reporter:label="Combined Facet Entry" oils_persist:readonly="true">
4140                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4141                         <field name="id" reporter:datatype="id" />
4142                         <field name="field" reporter:datatype="link"/>
4143                         <field name="source" reporter:datatype="link"/>
4144                         <field name="value"  reporter:datatype="text"/>
4145                 </fields>
4146                 <links>
4147                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4148                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4149                 </links>
4150         </class>
4151         <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">
4152                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4153                         <field name="id" reporter:datatype="id" />
4154                         <field name="value" reporter:datatype="text"/>
4155                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4156                 </fields>
4157                 <links>
4158                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4159                 </links>
4160                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4161                         <actions>
4162                                 <retrieve/>
4163                         </actions>
4164                 </permacrud>
4165         </class>
4166         <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">
4167                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4168                         <field name="id" reporter:datatype="id" />
4169                         <field name="entry" reporter:datatype="link"/>
4170                         <field name="def" reporter:datatype="link"/>
4171                         <field name="source" reporter:datatype="link"/>
4172                 </fields>
4173                 <links>
4174                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4175                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4176                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4177                 </links>
4178         </class>
4179         <class id="mbeshm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_simple_heading_map" oils_persist:tablename="metabib.browse_entry_simple_heading_map" reporter:label="Combined Browse Entry Simple Authority Heading Map" oils_persist:readonly="true">
4180                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4181                         <field name="id" reporter:datatype="id" />
4182                         <field name="entry" reporter:datatype="link"/>
4183                         <field name="simple_heading" reporter:datatype="link"/>
4184                 </fields>
4185                 <links>
4186                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4187                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4188                 </links>
4189         </class>
4190         <class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">
4191                 <oils_persist:source_definition><![CDATA[
4192                         SELECT * FROM metabib.author_field_entry
4193                                                 UNION ALL
4194                         SELECT * FROM metabib.keyword_field_entry
4195                                                 UNION ALL
4196                         SELECT * FROM metabib.identifier_field_entry
4197                                                 UNION ALL
4198                         SELECT * FROM metabib.title_field_entry
4199                                                 UNION ALL
4200                         SELECT * FROM metabib.subject_field_entry
4201                                                 UNION ALL
4202                         SELECT * FROM metabib.series_field_entry
4203                 ]]></oils_persist:source_definition>
4204                 <fields>
4205                         <field name="field" reporter:datatype="link"/>
4206                         <field name="id" reporter:datatype="id" />
4207                         <field name="source" reporter:datatype="link"/>
4208                         <field name="value"  reporter:datatype="text"/>
4209                 </fields>
4210                 <links>
4211                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4212                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4213                 </links>
4214         </class>
4215         <class id="mkfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::keyword_field_entry" oils_persist:tablename="metabib.keyword_field_entry" reporter:label="Keyword Field Entry">
4216                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4217                         <field name="field" reporter:datatype="link"/>
4218                         <field name="id" reporter:datatype="id" />
4219                         <field name="source" reporter:datatype="link"/>
4220                         <field name="value"  reporter:datatype="text"/>
4221                 </fields>
4222                 <links>
4223                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4224                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4225                 </links>
4226         </class>
4227         <class id="mcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
4228                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4229                         <field name="accepting_usr" reporter:datatype="link"/>
4230                         <field name="amount" reporter:datatype="money" />
4231                         <field name="amount_collected" reporter:datatype="money" />
4232                         <field name="cash_drawer" reporter:datatype="link"/>
4233                         <field name="id" reporter:datatype="id" />
4234                         <field name="note"  reporter:datatype="text"/>
4235                         <field name="payment_ts" reporter:datatype="timestamp"/>
4236                         <field name="xact" reporter:datatype="link"/>
4237                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4238                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4239                 </fields>
4240                 <links>
4241                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4242                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4243                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4244                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4245                 </links>
4246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4247             <actions>
4248                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4249                     <context link="xact" jump="usr" field="home_ou"/>
4250                 </retrieve>
4251                         </actions>
4252                 </permacrud>
4253         </class>
4254         <class id="mfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
4255                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4256                         <field name="accepting_usr" reporter:datatype="link"/>
4257                         <field name="amount" reporter:datatype="money" />
4258                         <field name="amount_collected" reporter:datatype="money" />
4259                         <field name="id" reporter:datatype="id" />
4260                         <field name="note"  reporter:datatype="text"/>
4261                         <field name="payment_ts" reporter:datatype="timestamp"/>
4262                         <field name="xact" reporter:datatype="link"/>
4263                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4264                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4265                 </fields>
4266                 <links>
4267                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4268                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4269                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4270                 </links>
4271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4272             <actions>
4273                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4274                     <context link="xact" jump="usr" field="home_ou"/>
4275                 </retrieve>
4276                         </actions>
4277                 </permacrud>
4278         </class>
4279         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4280                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4281                         <field name="accepting_usr" reporter:datatype="link"/>
4282                         <field name="amount" reporter:datatype="money" />
4283                         <field name="amount_collected" reporter:datatype="money" />
4284                         <field name="id" reporter:datatype="id" />
4285                         <field name="note"  reporter:datatype="text"/>
4286                         <field name="payment_ts" reporter:datatype="timestamp"/>
4287                         <field name="xact" reporter:datatype="link"/>
4288                         <field name="billing" reporter:datatype="link"/>
4289                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4290                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4291                 </fields>
4292                 <links>
4293                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4294                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4295                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4296                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4297                 </links>
4298         </class>
4299         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4300                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4301                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4302                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4303                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4304                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4305                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4306                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4307                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4308                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4309                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4310                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4311                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4312                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4313                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4314                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4315                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4316                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4317                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4318                 </fields>
4319                 <links>
4320                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4321                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4322                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4323                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4324                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4325                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4326                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4327                 </links>
4328         </class>
4329
4330         <class id="csp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::standing_penalty" oils_persist:tablename="config.standing_penalty" reporter:label="Standing Penalty">
4331                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4332                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4333                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4334                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4335                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4336                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4337                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4338                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4339                 </fields>
4340                 <links/>
4341         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4342             <actions>
4343                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4344                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4345                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4346                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4347             </actions>
4348         </permacrud>
4349         </class>
4350         <class id="pgpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_penalty_threshold" oils_persist:tablename="permission.grp_penalty_threshold" reporter:label="Group Penalty Threshold">
4351                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4352                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4353                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4354                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4355                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4356                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4357                 </fields>
4358                 <links>
4359                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4360                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4361                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4362         </links>
4363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4364             <actions>
4365                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4366                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4367                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4368                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4369             </actions>
4370         </permacrud>
4371         </class>
4372         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
4373                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4374                         <field name="holdable" reporter:datatype="bool"/>
4375                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4376                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4377                         <field name="opac_visible" reporter:datatype="bool"/>
4378             <field name="copy_active" reporter:datatype="bool"/>
4379             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4380             <field name="is_available" reporter:datatype="bool"/>
4381                 </fields>
4382                 <links/>
4383         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4384             <actions>
4385                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4386                 <retrieve/>
4387                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4388                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4389             </actions>
4390         </permacrud>
4391         </class>
4392         <class id="ausp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_standing_penalty" oils_persist:tablename="actor.usr_standing_penalty" oils_persist:restrict_primary="100" reporter:label="User Standing Penalty">
4393                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4394                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4395                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4396                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4397                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4398                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4399                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4400                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4401                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4402                 </fields>
4403                 <links>
4404                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4405                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4406                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4407                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4408                 </links>
4409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4410                         <actions>
4411                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4412                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4413                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4414                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4415                         </actions>
4416                 </permacrud>
4417         </class>
4418         <class id="aua" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
4419                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4420                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4421                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4422                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4423                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4424                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4425                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4426                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4427                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4428                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4429                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4430                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4431                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4432                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4433                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4434                 </fields>
4435                 <links>
4436                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4437                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4438                 </links>
4439                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4440                         <actions>
4441                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4442                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4443                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4444                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4445                         </actions>
4446                 </permacrud>
4447         </class>
4448         <class id="aal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::address_alert" oils_persist:tablename="actor.address_alert" reporter:label="Address Alert">
4449                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4450                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4451                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4452                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4453                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4454                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4455                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4456                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4457                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4458                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4459                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4460                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4461                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4462                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4463                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4464                 </fields>
4465                 <links>
4466                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4467                 </links>
4468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4469                         <actions>
4470                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4471                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4472                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4473                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4474                         </actions>
4475                 </permacrud>
4476         </class>
4477
4478
4479         <class id="auss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_saved_search" oils_persist:tablename="actor.usr_saved_search" reporter:label="User Saved Search">
4480                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4481                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4482                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4483                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4484                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4485                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4486                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4487                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4488                 </fields>
4489                 <links>
4490                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4491                 </links>
4492         </class>
4493
4494         <class id="acnn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_note" oils_persist:tablename="asset.call_number_note" reporter:label="Call Number Note">
4495                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4496                         <field name="call_number" />
4497                         <field name="create_date" reporter:datatype="timestamp"/>
4498                         <field name="creator" reporter:datatype="link"/>
4499                         <field name="id" reporter:datatype="id" />
4500                         <field name="pub" reporter:datatype="bool"/>
4501                         <field name="title"  reporter:datatype="text"/>
4502                         <field name="value"  reporter:datatype="text"/>
4503                 </fields>
4504                 <links>
4505                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4506                 </links>
4507         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4508             <actions>
4509                 <create permission="CREATE_VOLUME_NOTE">
4510                     <context link="call_number" field="owning_lib"/>
4511                 </create>
4512                 <retrieve permission="VIEW_VOLUME_NOTES">
4513                     <context link="call_number" field="owning_lib"/>
4514                 </retrieve>
4515                 <update permission="UPDATE_VOLUME_NOTE">
4516                     <context link="call_number" field="owning_lib"/>
4517                 </update>
4518                 <delete permission="DELETE_VOLUME_NOTE">
4519                     <context link="call_number" field="owning_lib"/>
4520                 </delete>
4521             </actions>
4522         </permacrud>
4523         </class>
4524         <class id="arn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_note" oils_persist:tablename="authority.record_note" reporter:label="Authority Record Note">
4525                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4526                         <field name="create_date" reporter:datatype="timestamp"/>
4527                         <field name="creator" reporter:datatype="link"/>
4528                         <field name="edit_date" reporter:datatype="timestamp"/>
4529                         <field name="editor" reporter:datatype="link"/>
4530                         <field name="id" reporter:datatype="id" />
4531                         <field name="record" reporter:datatype="link"/>
4532                         <field name="value" reporter:datatype="text"/>
4533                 </fields>
4534                 <links>
4535                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4536                 </links>
4537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4538             <actions>
4539                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4540                 <retrieve/>
4541                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4542                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4543             </actions>
4544         </permacrud>
4545         </class>
4546         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4547         <oils_persist:source_definition><![CDATA[
4548 SELECT  usr,
4549         SUM(
4550             CASE
4551                 WHEN (
4552                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4553                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4554                 ) THEN 1
4555                 ELSE 0
4556             END
4557         ) AS out,
4558
4559         SUM(
4560             CASE
4561                 WHEN (
4562                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4563                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4564                 ) THEN 1
4565                 ELSE 0
4566             END
4567         ) AS overdue,
4568
4569         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4570         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4571         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4572   FROM  action.circulation
4573   WHERE checkin_time IS NULL
4574   GROUP BY 1
4575         ]]></oils_persist:source_definition>
4576         <fields oils_persist:primary="usr">
4577             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4578             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4579             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4580             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4581             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4582             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4583         </fields>
4584         <links>
4585             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4586         </links>
4587         </class>
4588         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4589         <oils_persist:source_definition><![CDATA[
4590 SELECT  usr,
4591         STRING_AGG(
4592             CASE
4593                 WHEN (
4594                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4595                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4596                 ) THEN id::TEXT
4597                 ELSE '0'
4598             END
4599         ,',') AS out,
4600
4601         STRING_AGG(
4602             CASE
4603                 WHEN (
4604                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4605                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4606                 ) THEN id::TEXT
4607                 ELSE '0'
4608             END
4609         ,',') AS overdue,
4610
4611         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4612         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4613         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4614   FROM  action.circulation
4615   WHERE checkin_time IS NULL
4616   GROUP BY 1
4617         ]]></oils_persist:source_definition>
4618         <fields oils_persist:primary="usr">
4619             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4620             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4621             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4622             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4623             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4624             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4625         </fields>
4626         <links>
4627             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4628         </links>
4629         </class>
4630         <class id="circ" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
4631                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4632                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4633                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4634                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4635                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4636                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4637                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4638                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4639                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4640                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4641                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4642                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4643                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4644                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4645                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4646                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4647                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4648                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4649                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4650                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4651                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4652                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4653                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4654                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4655                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4656                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4657                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4658                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4659                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4660                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4661                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4662                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4663                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4664                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4665                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4666                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4667                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4668                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4669                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4670                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4671                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4672                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4673                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4674                 </fields>
4675                 <links>
4676                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4677                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4678                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4679                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4680                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4681                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4682                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4683                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4684                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4685                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4686                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4687                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4688                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4689                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4690                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4691                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4692                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4693                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4694                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4695                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4696                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4697                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4698                 </links>
4699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4700                         <actions>
4701                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4702                         </actions>
4703                 </permacrud>
4704         </class>
4705         <class id="aacct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_combined_types" oils_persist:tablename="action.all_circulation_combined_types" reporter:core="true" reporter:label="All Circulation Combined Types" oils_persist:readonly="true">
4706                 <fields>
4707                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4708                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4709                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4710                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4711                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4712                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4713                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4714                 </fields>
4715                 <links>
4716                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4717                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4718                 </links>
4719                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4720                         <actions>
4721                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4722                         </actions>
4723                 </permacrud>
4724         </class>
4725         <class id="aacs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_slim" oils_persist:tablename="action.all_circulation_slim" reporter:core="true" reporter:label="Combined Aged and Active circulations" oils_persist:readonly="true">
4726                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4727                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4728                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4729                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4730                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4731                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4732                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4733                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4734                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4735                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4736                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4737                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4738                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4739                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4740                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4741                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4742                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4743                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4744                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4745                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4746                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4747                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4748                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4749                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4750                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4751                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4752                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4753                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4754                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4755                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4756                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4757                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4758                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4759                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4760                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4761                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4762                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4763                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4764                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4765                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4766                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4767                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4768                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4769                 </fields>
4770                 <links>
4771                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4772                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4773                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4774                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4775                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4776                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4777                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4778                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4779                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4780                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4781                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4782                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4783                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4784                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4785                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4786                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4787                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4788                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4789                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4790                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4791                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4792                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4793                 </links>
4794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4795                         <actions>
4796                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4797                         </actions>
4798                 </permacrud>
4799         </class>
4800
4801         <class id="combcirc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">
4802                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4803                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4804                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4805                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4806                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4807                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4808                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4809                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4810                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4811                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4812                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4813                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4814                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4815                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4816                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4817                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4818                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4819                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4820                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4821                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4822                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4823                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4824                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4825                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4826                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4827                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4828                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4829                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4830                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4831                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4832                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4833                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4834                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4835                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4836                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4837                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4838                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4839                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4840                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4841                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4842                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4843                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4844                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4845                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4846                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4847                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4848                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4849                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4850                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4851                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4852                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4853                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4854                 </fields>
4855                 <links>
4856                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4857                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4858                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4859                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4860                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4861                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4862                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4863                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4864                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4865                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4866                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4867                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4868                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4869                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4870                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4871                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4872                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4873                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4874                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4875                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4876                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4877                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4878                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4879                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4880                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4881                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4882                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4883                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4884                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4885                 </links>
4886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4887                         <actions>
4888                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4889                         </actions>
4890                 </permacrud>
4891         </class>
4892         <class id="acirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::aged_circulation" oils_persist:tablename="action.aged_circulation" reporter:core="true" reporter:label="Aged (patronless) Circulation">
4893                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4894                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4895                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4896                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4897                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4898                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4899                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4900                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4901                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4902                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4903                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4904                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4905                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4906                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4907                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4908                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4909                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4910                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4911                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4912                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4913                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4914                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4915                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4916                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4917                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4918                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4919                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4920                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4921                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4922                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4923                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4924                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4925                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4926                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4927                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4928                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4929                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4930                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4931                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4932                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4933                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4934                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4935                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4936                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4937                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4938                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4939                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4940                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4941                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4942                 </fields>
4943                 <links>
4944                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4945                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4946                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4947                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4948                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4949                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4950                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4951                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4952                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4953                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4954                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4955                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4956                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4957                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4958                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4959                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4960                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4961                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4962                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4963                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4964                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4965                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4966                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4967                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4968                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4969                 </links>
4970         </class>
4971         <class id="auch" 
4972                 controller="open-ils.cstore" 
4973                 oils_obj:fieldmapper="action::user_circ_history" 
4974                 oils_persist:tablename="action.usr_circ_history" 
4975                 reporter:label="User Checkout History">
4976                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4977                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4978                         <!-- prevent reporting on the user that owns the checkout history -->
4979                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4980                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4981                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4982                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4983                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4984                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4985                 </fields>
4986                 <links>
4987                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4988                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4989                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4990                 </links>
4991         </class>
4992         <class id="brt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_type" oils_persist:tablename="booking.resource_type" reporter:label="Resource Type">
4993                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4994                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4995                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
4996                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4997                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4998                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4999                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5000                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
5001                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
5002                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
5003                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
5004                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5005                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5006                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5007                 </fields>
5008                 <links>
5009                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5010                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5011                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5012                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5013                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5014                 </links>
5015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5016                         <actions>
5017                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5018                                 <retrieve permission="VIEW_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5019                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5020                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5021                         </actions>
5022                 </permacrud>
5023         </class>
5024
5025         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5026                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5027                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5028                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5029                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5030                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5031                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5032                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5033                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5034                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5035                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5036                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5037                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5038                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5039                 </fields>
5040                 <links>
5041                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5042                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5043                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5044                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5045                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5046                 </links>
5047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5048                         <actions>
5049                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5050                                 <retrieve permission="VIEW_BOOKING_RESOURCE" context_field='owner'/>
5051                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5052                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5053                         </actions>
5054                 </permacrud>
5055         </class>
5056         
5057         <class id="bra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr" oils_persist:tablename="booking.resource_attr" reporter:label="Resource Attribute">
5058                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5059                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5060                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5061                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5062                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5063                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5064                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5065                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5066                 </fields>
5067                 <links>
5068                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5069                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5070                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5071                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5072                 </links>
5073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5074                         <actions>
5075                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5076                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5077                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5078                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5079                         </actions>
5080                 </permacrud>
5081         </class>
5082         
5083         <class id="brav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_value" oils_persist:tablename="booking.resource_attr_value" reporter:label="Resource Attribute Value">
5084                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5085                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5086                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5087                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5088                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5089                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5090                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5091                 </fields>
5092                 <links>
5093                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5094                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5095                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5096                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5097                 </links>
5098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5099                         <actions>
5100                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5101                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5102                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5103                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5104                         </actions>
5105                 </permacrud>
5106         </class>
5107         
5108         <class id="bram" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_map" oils_persist:tablename="booking.resource_attr_map" reporter:label="Resource Attribute Map">
5109                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5110                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5111                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5112                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5113                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5114                 </fields>
5115                 <links>
5116                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5117                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5118                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5119                 </links>
5120                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5121                         <actions>
5122                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5123                     <context link="resource" field="owner" />
5124                 </create>
5125                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5126                     <context link="resource" field="owner" />
5127                 </retrieve>
5128                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5129                     <context link="resource" field="owner" />
5130                 </update>
5131                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5132                     <context link="resource" field="owner" />
5133                 </delete>
5134                         </actions>
5135                 </permacrud>
5136         </class>
5137         
5138         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5139                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5140                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5141                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5142                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5143                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5144                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5145                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5146                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5147                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5148                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5149                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5150                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5151                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5152                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5153                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5154                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5155                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5156                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5157                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5158                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5159                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5160                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5161                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5162                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5163                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5164                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5165                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5166                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5167                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5168                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5169                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5170                 </fields>
5171                 <links>
5172                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5173                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5174                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5175                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5176                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5177                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5178                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5179                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5180                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5181                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5182                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5183                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5184                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5185                 </links>
5186                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5187                         <actions>
5188                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5189                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5190                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5191                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5192                         </actions>
5193                 </permacrud>
5194         </class>
5195         
5196         <class id="bravm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation_attr_value_map" oils_persist:tablename="booking.reservation_attr_value_map" reporter:label="Reservation Attribute Value Map">
5197                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5198                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5199                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5200                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5201                 </fields>
5202                 <links>
5203                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5204                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5205                 </links>
5206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5207                         <actions>
5208                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5209                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5210                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5211                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5212                         </actions>
5213                 </permacrud>
5214         </class>
5215
5216         <class id="ccnbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
5217                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5218                         <field name="bucket" reporter:datatype="link"/>
5219                         <field name="id" reporter:datatype="id" />
5220                         <field name="target_call_number" reporter:datatype="link" />
5221                         <field name="create_time" reporter:datatype="timestamp" />
5222                         <field name="pos" reporter:datatype="int" />
5223                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5224                 </fields>
5225                 <links>
5226                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5227                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5228             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5229                 </links>
5230                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5231                         <actions>
5232                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5233                     <context link="bucket" owning_lib="owning_lib"/>
5234                 </retrieve>
5235             </actions>
5236         </permacrud>
5237         </class>
5238         <class id="ccnbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item_note" oils_persist:tablename="container.call_number_bucket_item_note" reporter:label="Call Number Bucket Item Note">
5239                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5240                         <field name="id" reporter:datatype="id" />
5241                         <field name="item" reporter:datatype="link"/>
5242                         <field name="note" reporter:datatype="text" />
5243                 </fields>
5244                 <links>
5245                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5246                 </links>
5247         </class>
5248         <class id="cbreb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
5249                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5250                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5251                         <field name="btype" reporter:datatype="text"/>
5252                         <field name="id" reporter:datatype="id" />
5253                         <field name="name" reporter:datatype="text"/>
5254                         <field name="description" reporter:datatype="text"/>
5255                         <field name="owner" reporter:datatype="link"/>
5256                         <field name="pub" reporter:datatype="bool"/>
5257                         <field name="create_time" reporter:datatype="timestamp" />
5258                         <field name="owning_lib" reporter:datatype="org_unit" />
5259                 </fields>
5260                 <links>
5261                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5262                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5263                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5264                 </links>
5265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5266                         <actions>
5267                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5268                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5269                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5270                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5271                         </actions>
5272                 </permacrud>
5273         </class>
5274         <class id="cbrebn" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_note" oils_persist:tablename="container.biblio_record_entry_bucket_note" reporter:label="Bibliographic Record Entry Bucket Note">
5275                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5276                         <field name="id" reporter:datatype="id" />
5277                         <field name="bucket" reporter:datatype="link"/>
5278                         <field name="note" reporter:datatype="text" />
5279                 </fields>
5280                 <links>
5281                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5282                 </links>
5283         </class>
5284         <class id="ahcm" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_copy_map" oils_persist:tablename="action.hold_copy_map" reporter:label="Hold Copy Map">
5285                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5286                         <field name="hold" reporter:datatype="link"/>
5287                         <field name="id" reporter:datatype="id" />
5288                         <field name="target_copy" reporter:datatype="link"/>
5289                         <field name="proximity" reporter:datatype="number"/>
5290                 </fields>
5291                 <links>
5292                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5293                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5294                 </links>
5295         </class>
5296         <class id="ahn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
5297                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5298                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5299                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5300                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5301                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5302                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5303                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5304                 </fields>
5305                 <links>
5306                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5307                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5308                 </links>
5309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5310             <actions>
5311                 <create permission="CREATE_HOLD_NOTIFICATION">
5312                                         <context link="hold" jump="usr" field="home_ou" />
5313                                 </create>
5314                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5315                                         <context link="hold" jump="usr" field="home_ou" />
5316                                 </retrieve>
5317                 <update permission="CREATE_HOLD_NOTIFICATION">
5318                                         <context link="hold" jump="usr" field="home_ou" />
5319                                 </update>
5320                 <delete permission="CREATE_HOLD_NOTIFICATION">
5321                                         <context link="hold" jump="usr" field="home_ou" />
5322                                 </delete>
5323             </actions>
5324         </permacrud>
5325         </class>
5326         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location"  oils_persist:field_safe="true">
5327                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5328                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5329                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5330                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5331                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5332                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5333                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5334                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5335                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5336                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5337                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5338                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5339                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5340                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5341                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5342                 </fields>
5343                 <links>
5344                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5345                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5346                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5347                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5348                 </links>
5349         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5350             <actions>
5351                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5352                 <retrieve/>
5353                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5354                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5355             </actions>
5356         </permacrud>
5357         </class>
5358         <class id="acplg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group" oils_persist:tablename="asset.copy_location_group" reporter:label="Copy/Shelving Location Group">
5359                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5360                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5361                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5362                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5363                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5364             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5365             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5366             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5367                 </fields>
5368                 <links>
5369                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5370                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5371                 </links>
5372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5373             <actions>
5374                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5375                 <retrieve/>
5376                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5377                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5378             </actions>
5379         </permacrud>
5380         </class>
5381         <class id="acplgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group_map" oils_persist:tablename="asset.copy_location_group_map" reporter:label="Copy/Shelving Location Group Map">
5382                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5383                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5384             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5385             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5386                 </fields>
5387                 <links>
5388                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5389                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5390                 </links>
5391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5392             <actions>
5393                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5394                                         <context link="lgroup" field="owner" />
5395                 </create>
5396                 <retrieve/>
5397                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5398                                         <context link="lgroup" field="owner" />
5399                 </update>
5400                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5401                                         <context link="lgroup" field="owner" />
5402                 </delete>
5403             </actions>
5404         </permacrud>
5405         </class>
5406
5407     <class id="acplo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_order" oils_persist:tablename="asset.copy_location_order" reporter:label="Copy/Shelving Location Order">
5408         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5409             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5410             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5411             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5412             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5413         </fields>
5414         <links>
5415             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5416             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5417         </links>
5418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5419             <actions>
5420                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5421                 <retrieve/>
5422                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5423                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5424             </actions>
5425         </permacrud>
5426     </class>
5427
5428         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5429                 <fields>
5430                         <field name="sre_id" oils_persist:virtual="true" />
5431                         <field name="location" oils_persist:virtual="true" />
5432                         <field name="owning_lib" oils_persist:virtual="true" />
5433                         <field name="basic_holdings" oils_persist:virtual="true" />
5434                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5435                         <field name="supplement_holdings" oils_persist:virtual="true" />
5436                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5437                         <field name="index_holdings" oils_persist:virtual="true" />
5438                         <field name="index_holdings_add" oils_persist:virtual="true" />
5439                         <field name="online" oils_persist:virtual="true" />
5440                         <field name="missing" oils_persist:virtual="true" />
5441                         <field name="incomplete" oils_persist:virtual="true" />
5442                 </fields>
5443         </class>
5444
5445         <class id="sre" controller="open-ils.pcrud open-ils.cstore" oils_obj:fieldmapper="serial::record_entry" oils_persist:tablename="serial.record_entry" reporter:label="Serial Record Entry">
5446                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5447                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5448                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5449                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5450                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5451                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5452                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5453                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5454                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5455                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5456                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5457                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5458                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5459                 </fields>
5460                 <links>
5461                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5462                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5463                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5464                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5465                 </links>
5466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5467                         <actions>
5468                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5469                                 <retrieve/>
5470                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5471                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5472                         </actions>
5473                 </permacrud>
5474         </class>
5475
5476         <class id="scap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">
5477                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5478                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5479                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5480                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5481                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5482                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5483                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5484                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5485                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5486                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5487                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5488                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5489                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5490                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5491                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5492                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5493                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5494                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5495                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5496                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5497                 </fields>
5498                 <links>
5499                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5500                 </links>
5501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5502                         <actions>
5503                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5504                                         <context link="subscription" field="owning_lib" />
5505                                 </create>
5506                                 <retrieve />
5507                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5508                                         <context link="subscription" field="owning_lib" />
5509                                 </update>
5510                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5511                                         <context link="subscription" field="owning_lib" />
5512                                 </delete>
5513                         </actions>
5514                 </permacrud>
5515         </class>
5516
5517         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5518                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5519                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5520                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5521                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5522                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5523                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5524                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5525                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5526                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5527                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5528                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5529                 </fields>
5530                 <links>
5531                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5532                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5533                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5534                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5535                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5536                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5537                 </links>
5538                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5539                         <actions>
5540                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5541                                 <retrieve />
5542                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5543                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5544                         </actions>
5545                 </permacrud>
5546         </class>
5547
5548         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
5549                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5550                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5551                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5552                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5553                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5554                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5555                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5556                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5557                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5558                 </fields>
5559                 <links>
5560                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5561                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5562                 </links>
5563                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5564                         <actions>
5565                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5566                     <context link="subscription" field="owning_lib"/>
5567                 </create>
5568                                 <retrieve />
5569                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5570                     <context link="subscription" field="owning_lib"/>
5571                 </update>
5572                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5573                     <context link="subscription" field="owning_lib"/>
5574                 </delete>
5575                         </actions>
5576                 </permacrud>
5577         </class>
5578
5579         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5580                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5581                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5582                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5583                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5584                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5585                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5586                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5587                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5588                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5589                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5590                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5591                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5592                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5593                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5594                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5595                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5596                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5597                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5598                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5599                 </fields>
5600                 <links>
5601                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5602                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5603                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5604                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5605                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5606                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5607                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5608                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5609                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5610                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5611                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5612                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5613                 </links>
5614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5615                         <actions>
5616                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5617                                 <retrieve />
5618                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5619                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5620                         </actions>
5621                 </permacrud>
5622         </class>
5623
5624         <class id="sdistn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution_note" oils_persist:tablename="serial.distribution_note" reporter:label="Distribution Note">
5625                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5626                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5627                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5628                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5629                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5630                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5631                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5632                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5633                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5634                 </fields>
5635                 <links>
5636                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5637                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5638                 </links>
5639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5640                         <actions>
5641                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5642                                         <context link="distribution" field="holding_lib" />
5643                                 </create>
5644                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5645                                         <context link="distribution" field="holding_lib" />
5646                                 </retrieve>
5647                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5648                                         <context link="distribution" field="holding_lib" />
5649                                 </update>
5650                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5651                                         <context link="distribution" field="holding_lib" />
5652                                 </delete>
5653                         </actions>
5654                 </permacrud>
5655         </class>
5656
5657         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5658                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5659                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5660                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5661                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5662                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5663                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5664                 </fields>
5665                 <links>
5666                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5667                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5668                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5669                 </links>
5670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5671                         <actions>
5672                                 <create permission="ADMIN_SERIAL_STREAM">
5673                                         <context link="distribution" field="holding_lib" />
5674                                 </create>
5675                                 <retrieve />
5676                                 <update permission="ADMIN_SERIAL_STREAM">
5677                                         <context link="distribution" field="holding_lib" />
5678                                 </update>
5679                                 <delete permission="ADMIN_SERIAL_STREAM">
5680                                         <context link="distribution" field="holding_lib" />
5681                                 </delete>
5682                         </actions>
5683                 </permacrud>
5684         </class>
5685
5686         <class id="srlu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::routing_list_user" oils_persist:tablename="serial.routing_list_user" reporter:label="Routing List User">
5687                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5688                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5689                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5690                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5691                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5692                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5693                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5694                 </fields>
5695                 <links>
5696                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5697                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5698                 </links>
5699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5700                         <actions>
5701                                 <create permission="ADMIN_SERIAL_STREAM">
5702                                         <context link="stream" jump="distribution" field="holding_lib" />
5703                                 </create>
5704                                 <retrieve permission="RECEIVE_SERIAL">
5705                                         <context link="stream" jump="distribution" field="holding_lib" />
5706                                 </retrieve>
5707                                 <update permission="ADMIN_SERIAL_STREAM">
5708                                         <context link="stream" jump="distribution" field="holding_lib" />
5709                                 </update>
5710                                 <delete permission="ADMIN_SERIAL_STREAM">
5711                                         <context link="stream" jump="distribution" field="holding_lib" />
5712                                 </delete>
5713                         </actions>
5714                 </permacrud>
5715         </class>
5716
5717         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5718                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5719                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5720                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5721                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5722                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5723                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5724                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5725                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5726                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5727                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5728                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5729                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5730                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5731                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5732                 </fields>
5733                 <links>
5734                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5735                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5736                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5737                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5738                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5739                 </links>
5740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5741                         <actions>
5742                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5743                                         <context link="subscription" field="owning_lib" />
5744                                 </create>
5745                                 <retrieve/>
5746                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5747                                         <context link="subscription" field="owning_lib" />
5748                                 </update>
5749                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5750                                         <context link="subscription" field="owning_lib" />
5751                                 </delete>
5752                         </actions>
5753                 </permacrud>
5754         </class>
5755
5756         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5757                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5758                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5759                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5760                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5761                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5762                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5763                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5764                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5765                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5766                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5767                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5768                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5769                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5770                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5771                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5772                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5773                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5774                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5775                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5776                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5777                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5778                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5779                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5780                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5781                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5782                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5783                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5784                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5785                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5786                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5787                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5788                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5789                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5790                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5791                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5792                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5793                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5794                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5795                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5796                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5797                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5798                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5799                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5800                 </fields>
5801                 <links>
5802                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5803                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5804                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5805                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5806                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5807                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5808                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5809                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5810                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5811                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5812                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5813                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5814                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5815                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5816                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5817                 </links>
5818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5819                         <actions>
5820                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5821                                 <retrieve/>
5822                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5823                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5824                         </actions>
5825                 </permacrud>
5826         </class>
5827
5828         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5829                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5830                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5831                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5832                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5833                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5834                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5835                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5836                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5837                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5838                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5839                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5840                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5841                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5842                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5843                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5844                 </fields>
5845                 <links>
5846                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5847                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5848                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5849                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5850                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5851                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5852                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5853                 </links>
5854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5855                         <actions>
5856                                 <create permission="ADMIN_SERIAL_ITEM">
5857                                         <context link="stream" jump="distribution" field="holding_lib" />
5858                                 </create>
5859                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5860                                         <context link="stream" jump="distribution" field="holding_lib" />
5861                                 </retrieve>
5862                                 <update permission="ADMIN_SERIAL_ITEM">
5863                                         <context link="stream" jump="distribution" field="holding_lib" />
5864                                 </update>
5865                                 <delete permission="ADMIN_SERIAL_ITEM">
5866                                         <context link="stream" jump="distribution" field="holding_lib" />
5867                                 </delete>
5868                         </actions>
5869                 </permacrud>
5870         </class>
5871
5872         <class id="sin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5873                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5874                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5875                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5876                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5877                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5878                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5879                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5880                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5881                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5882                 </fields>
5883                 <links>
5884                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5885                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5886                 </links>
5887                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5888                         <actions>
5889                                 <create permission="ADMIN_SERIAL_ITEM">
5890                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5891                                 </create>
5892                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5893                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5894                                 </retrieve>
5895                                 <update permission="ADMIN_SERIAL_ITEM">
5896                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5897                                 </update>
5898                                 <delete permission="ADMIN_SERIAL_ITEM">
5899                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5900                                 </delete>
5901                         </actions>
5902                 </permacrud>
5903         </class>
5904         <class id="sasum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::any_summary" oils_persist:tablename="serial.any_summary" reporter:label="All Issues' Summaries" oils_persist:readonly="true">
5905                 <fields>
5906                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5907                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5908                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5909                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5910                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5911                 </fields>
5912                 <links>
5913                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5914                 </links>
5915         </class>
5916         <class id="smhc" controller="open-ils.cstore" oils_obj:fieldmapper="serial::materialized_holding_code" oils_persist:tablename="serial.materialized_holding_code" reporter:label="Materialized Holding Code" oils_persist:readonly="true">
5917                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5918                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5919                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5920                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5921                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5922                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5923                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5924                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5925                 </fields>
5926                 <links>
5927                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5928                 </links>
5929         </class>
5930         <class id="sbsum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::basic_summary" oils_persist:tablename="serial.basic_summary" reporter:label="Basic Issue Summary">
5931                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5932                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5933                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5934                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5935                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5936                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5937                 </fields>
5938                 <links>
5939                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5940                 </links>
5941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5942                         <actions>
5943                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5944                                         <context link="distribution" field="holding_lib" />
5945                                 </create>
5946                                 <retrieve/>
5947                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5948                                         <context link="distribution" field="holding_lib" />
5949                                 </update>
5950                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5951                                         <context link="distribution" field="holding_lib" />
5952                                 </delete>
5953                         </actions>
5954                 </permacrud>
5955         </class>
5956
5957         <class id="sssum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::supplement_summary" oils_persist:tablename="serial.supplement_summary" reporter:label="Supplemental Issue Summary">
5958                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5959                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5960                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5961                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5962                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5963                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5964                 </fields>
5965                 <links>
5966                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5967                 </links>
5968                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5969                         <actions>
5970                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5971                                         <context link="distribution" field="holding_lib" />
5972                                 </create>
5973                                 <retrieve/>
5974                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5975                                         <context link="distribution" field="holding_lib" />
5976                                 </update>
5977                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5978                                         <context link="distribution" field="holding_lib" />
5979                                 </delete>
5980                         </actions>
5981                 </permacrud>
5982         </class>
5983
5984         <class id="sisum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Issue Summary">
5985                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5986                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5987                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5988                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5989                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5990                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5991                 </fields>
5992                 <links>
5993                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5994                 </links>
5995                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5996                         <actions>
5997                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5998                                         <context link="distribution" field="holding_lib" />
5999                                 </create>
6000                                 <retrieve/>
6001                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6002                                         <context link="distribution" field="holding_lib" />
6003                                 </update>
6004                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6005                                         <context link="distribution" field="holding_lib" />
6006                                 </delete>
6007                         </actions>
6008                 </permacrud>
6009         </class>
6010
6011         <class id="spt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::pattern_template" oils_persist:tablename="serial.pattern_template" reporter:label="Prediction Pattern Template">
6012                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6013                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6014                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6015                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6016                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6017                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6018                 </fields>
6019                 <links>
6020                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6021                 </links>
6022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6023                         <actions>
6024                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6025                                 <retrieve/>
6026                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6027                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6028                         </actions>
6029                 </permacrud>
6030         </class>
6031
6032         <class id="ascecm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_entry_copy_map" oils_persist:tablename="asset.stat_cat_entry_copy_map" reporter:label="Statistical Category Entry Copy Map">
6033                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6034                         <field name="id" reporter:datatype="id" />
6035                         <field name="owning_copy" reporter:datatype="link"/>
6036                         <field name="stat_cat" reporter:datatype="link"/>
6037                         <field name="stat_cat_entry" reporter:datatype="link"/>
6038                 </fields>
6039                 <links>
6040                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6041                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6042                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6043                 </links>
6044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6045                         <actions>
6046                                 <retrieve/>
6047                         </actions>
6048                 </permacrud>
6049         </class>
6050         <class id="citm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_type_map" oils_persist:tablename="config.item_type_map" reporter:label="Item Type Map" oils_persist:field_safe="true">
6051                 <fields oils_persist:primary="code">
6052                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6053                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6054                 </fields>
6055                 <links/>
6056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6057             <actions>
6058                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6059                 <retrieve/>
6060                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6061                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6062             </actions>
6063         </permacrud>
6064         </class>
6065         <class id="cblvl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_level_map" oils_persist:tablename="config.bib_level_map" reporter:label="Bib Level Map" oils_persist:field_safe="true">
6066                 <fields oils_persist:primary="code">
6067                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6068                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6069                 </fields>
6070                 <links/>
6071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6072             <actions>
6073                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6074                 <retrieve/>
6075                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6076                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6077             </actions>
6078         </permacrud>
6079         </class>
6080         <class id="sra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="search::relevance_adjustment" oils_persist:tablename="search.relevance_adjustment" reporter:label="Relevance Adjustment">
6081                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6082                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6083                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6084                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6085                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6086                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6087                 </fields>
6088                 <links>
6089             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6090         </links>
6091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6092             <actions>
6093                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6094                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6095                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6096                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6097             </actions>
6098         </permacrud>
6099         </class>
6100         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Org Lasso">
6101                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6102                         <field name="id" reporter:datatype="id" />
6103                         <field name="name" reporter:datatype="text"/>
6104                 </fields>
6105                 <links/>
6106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6107             <actions>
6108                 <create permission="CREATE_LASSO" global_required="true"/>
6109                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
6110                 <update permission="UPDATE_LASSO" global_required="true"/>
6111                 <delete permission="DELETE_LASSO" global_required="true"/>
6112             </actions>
6113         </permacrud>
6114         </class>
6115         <class id="lmap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso_map" oils_persist:tablename="actor.org_lasso_map" reporter:label="Org Lasso Map">
6116                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6117                         <field name="id" reporter:datatype="id" />
6118                         <field name="lasso" reporter:datatype="link"/>
6119                         <field name="org_unit" reporter:datatype="org_unit"/>
6120                 </fields>
6121                 <links>
6122                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6123                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6124                 </links>
6125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6126             <actions>
6127                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
6128                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
6129                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
6130                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
6131             </actions>
6132         </permacrud>
6133         </class>
6134         <class id="aoupa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_proximity_adjustment" oils_persist:tablename="actor.org_unit_proximity_adjustment" reporter:label="Org Unit Proximity Adjustment">
6135                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6136                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6137                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6138                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6139                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6140                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6141                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6142                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6143                         <field name="pos" reporter:label="Position" reporter:datatype="int" oils_obj:required="true" />
6144                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6145                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6146                 </fields>
6147                 <links>
6148                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6149                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6150                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6151                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6152                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6153                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6154                 </links>
6155         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6156             <actions>
6157                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6158                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6159                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6160                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6161             </actions>
6162         </permacrud>
6163         </class>
6164         <class id="aoup" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_proximity" oils_persist:tablename="actor.org_unit_proximity" reporter:label="Org Unit Proximity">
6165                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6166                         <field name="id" reporter:datatype="id" />
6167                         <field name="from_org" reporter:datatype="org_unit"/>
6168                         <field name="to_org" reporter:datatype="org_unit"/>
6169                         <field name="prox" reporter:datatype="int" />
6170                 </fields>
6171                 <links>
6172                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6173                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6174                 </links>
6175         </class>
6176         <class id="ssr" controller="open-ils.cstore" oils_obj:fieldmapper="search::search_result" oils_persist:tablename="search.search_result" oils_persist:readonly="true" reporter:label="Search Result">
6177                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6178                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6179                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6180                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6181                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6182                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6183                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6184                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6185                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6186                 </fields>
6187                 <links/>
6188         </class>
6189         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6190                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6191                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6192                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6193                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6194                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6195                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6196                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6197                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6198                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6199                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6200                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6201                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6202                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6203                 </fields>
6204                 <links>
6205                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6206                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6207                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6208                 </links>
6209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6210             <actions>
6211                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6212                 <retrieve/>
6213                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6214                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6215             </actions>
6216         </permacrud>
6217         </class>
6218         <class id="aoa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_address" oils_persist:tablename="actor.org_address" reporter:label="Org Address">
6219                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6220                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6221                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6222                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6223                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6224                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6225                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6226                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6227                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6228                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6229                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6230                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6231                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6232                 </fields>
6233                 <links>
6234                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6235                 </links>
6236         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6237             <actions>
6238                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6239                 <retrieve/>
6240                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6241                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6242             </actions>
6243         </permacrud>
6244         </class>
6245         <class id="asq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_query" oils_persist:tablename="actor.search_query" reporter:label="Search Query" oils_persist:field_safe="true">
6246                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6247                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6248                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6249                         <field name="query_text" reporter:datatype="text"/>
6250                 </fields>
6251         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6252             <actions>
6253                 <retrieve/>
6254             </actions>
6255         </permacrud>
6256         </class>
6257
6258         <class id="asfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group" oils_persist:tablename="actor.search_filter_group" reporter:label="Search Filter Group" oils_persist:field_safe="true">
6259                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6260                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6261                         <field name="owner" reporter:datatype="org_unit"/>
6262                         <field name="code" reporter:datatype="text"/>
6263                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6264                         <field name="create_date" reporter:datatype="timestamp"/>
6265                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6266                 </fields>
6267                 <links>
6268                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6269                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6270                 </links>
6271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6272             <actions>
6273                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6274                 <retrieve/>
6275                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6276                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6277             </actions>
6278         </permacrud>
6279         </class>
6280         <class id="asfge" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group_entry" oils_persist:tablename="actor.search_filter_group_entry" reporter:label="Search Filter Group Entry" oils_persist:field_safe="true">
6281                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6282                         <field name="id" reporter:datatype="id"/>
6283                         <field name="grp" reporter:datatype="link"/>
6284                         <field name="pos" reporter:datatype="int"/>
6285                         <field name="query" reporter:datatype="link"/>
6286                 </fields>
6287                 <links>
6288                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6289                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6290                 </links>
6291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6292             <actions>
6293                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6294                     <context link="grp" field="owner"/>
6295                 </create>
6296                 <retrieve/>
6297                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6298                     <context link="grp" field="owner"/>
6299                 </update>
6300                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6301                     <context link="grp" field="owner"/>
6302                 </delete>
6303             </actions>
6304         </permacrud>
6305         </class>
6306
6307         <!-- A note: Please update alhr and ahopl when updating ahr -->
6308         <class id="ahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
6309                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6310                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6311                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6312                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6313                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6314                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6315                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6316                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6317                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6318                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6319                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6320                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6321                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6322                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6323                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6324                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6325                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6326                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6327                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6328                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6329                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6330                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6331                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6332                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6333                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6334                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6335                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6336                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6337                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6338                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6339                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6340                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6341                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6342                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6343                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6344                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6345                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6346                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6347                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6348                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6349                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6350                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6351                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6352                 </fields>
6353                 <links>
6354                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6355                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6356                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6357                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6358                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6359                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6360                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6361                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6362                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6363                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6364                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6365                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6366                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6367                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6368                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6369                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6370                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6371                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6372                 </links>
6373                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6374                         <actions>
6375                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6376                         </actions>
6377                 </permacrud>
6378         </class>
6379         <class id="ahopl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_on_pull_list" reporter:label="Hold On Pull List" oils_persist:readonly="true">
6380                 <oils_persist:source_definition><![CDATA[
6381                 SELECT
6382                         ahr.*,
6383                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6384                                 copy_location_order_position,
6385                         CASE WHEN au.alias IS NOT NULL THEN
6386                                 au.alias
6387                         ELSE
6388                                 au.first_given_name
6389                         END AS usr_alias_or_first_given_name,
6390                         au.first_given_name AS usr_first_given_name,
6391                         au.second_given_name AS usr_second_given_name,
6392                         au.family_name AS usr_family_name,
6393                         au.prefix AS usr_prefix,
6394                         au.suffix AS usr_suffix,
6395                         au.alias AS usr_alias,
6396                         CASE WHEN au.alias IS NOT NULL THEN
6397                                 au.alias
6398                         ELSE
6399                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6400                                         COALESCE(au.family_name, ''),
6401                                         COALESCE(au.suffix, ''),
6402                                         ', ',
6403                                         COALESCE(au.prefix, ''),
6404                                         COALESCE(au.first_given_name, ''),
6405                                         COALESCE(au.second_given_name, '')
6406                                 ], ' '), E'\\s+,', ',')
6407                         END AS usr_alias_or_display_name,
6408                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6409                                 COALESCE(au.family_name, ''),
6410                                 COALESCE(au.suffix, ''),
6411                                 ', ',
6412                                 COALESCE(au.prefix, ''),
6413                                 COALESCE(au.first_given_name, ''),
6414                                 COALESCE(au.second_given_name, '')
6415                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6416                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6417                                 AS call_number_label,
6418                         siss.label AS issuance_label,
6419                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6420                         ahcm_1.copy_count AS potential_copies
6421                 FROM action.hold_request ahr
6422                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6423                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6424                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6425                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6426                 JOIN actor.usr au ON (au.id = ahr.usr)
6427                 JOIN (
6428                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6429                         FROM asset.copy_location
6430                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6431                 LEFT JOIN actor.usr_standing_penalty ausp 
6432                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6433                 LEFT JOIN config.standing_penalty csp
6434                         ON (
6435                                 csp.id = ausp.standing_penalty AND 
6436                                 csp.block_list LIKE '%CAPTURE%' AND (
6437                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6438                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6439                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6440                                         )
6441                                 )
6442                         )
6443                 JOIN (
6444                         SELECT COUNT(target_copy) AS copy_count, hold
6445                         FROM action.hold_copy_map
6446                         GROUP BY 2
6447                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6448                 LEFT JOIN serial.issuance siss
6449                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6450                 LEFT JOIN asset.copy_location_order acplo
6451                         ON (acp.location = acplo.location AND
6452                                 acp.circ_lib = acplo.org)
6453                 WHERE
6454                         ahr.capture_time IS NULL AND
6455                         ahr.cancel_time IS NULL AND
6456                         csp.id IS NULL AND
6457                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6458                         acp.status IN (0,7)
6459                 ]]></oils_persist:source_definition>
6460                 <fields oils_persist:primary="id">
6461                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6462                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6463                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6464                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6465                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6466                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6467                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6468                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6469                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6470                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6471                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6472                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6473                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6474                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6475                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6476                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6477                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6478                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6479                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6480                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6481                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6482                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6483                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6484                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6485                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6486                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6487                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6488                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6489                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6490                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6491                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6492                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6493                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6494                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6495                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6496                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6497                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6498                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6499                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6500                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6501                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6502                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6503                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6504                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6505                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6506                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6507                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6508                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6509                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6510                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6511                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6512                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6513                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6514                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6515                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6516                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6517                 </fields>
6518                 <links>
6519                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6520                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6521                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6522                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6523                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6524                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6525                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6526                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6527                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6528                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6529                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6530                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6531                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6532                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6533                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6534                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6535                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6536                 </links>
6537                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6538                         <actions>
6539                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6540                         </actions>
6541                 </permacrud>
6542         </class>
6543         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6544                 <oils_persist:source_definition><![CDATA[
6545                         SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL AND current_copy IS NOT NULL AND fulfillment_time IS NULL GROUP BY current_copy)x USING (current_copy, capture_time)
6546                 ]]></oils_persist:source_definition>
6547                 <fields oils_persist:primary="id">
6548                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6549                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6550                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6551                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6552                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6553                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6554                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6555                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6556                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6557                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6558                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6559                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6560                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6561                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6562                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6563                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6564                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6565                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6566                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6567                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6568                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6569                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6570                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6571                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6572                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6573                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6574                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6575                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6576                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6577                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6578                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6579                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6580                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6581                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6582                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6583                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6584                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6585                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6586                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6587                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6588                 </fields>
6589                 <links>
6590                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6591                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6592                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6593                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6594                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6595                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6596                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6597                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6598                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6599                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6600                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6601                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6602                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6603                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6604                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6605                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6606                 </links>
6607         </class>
6608
6609         <class id="ahrn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request_note" oils_persist:tablename="action.hold_request_note" reporter:label="Hold Request Note">
6610                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6611                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6612                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6613                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6614                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6615                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6616                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6617                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6618                 </fields>
6619                 <links>
6620                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6621                 </links>
6622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6623                         <actions>
6624                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6625                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6626                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6627                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6628                         </actions>
6629                 </permacrud>
6630         </class>
6631         <class id="combahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_hold_request" oils_persist:tablename="action.all_hold_request" reporter:core="true" reporter:label="Combined (Active &amp; Aged) Hold Request">
6632                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6633                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6634                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6635                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6636                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6637                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6638                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6639                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6640                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6641                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6642                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6643                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6644                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6645                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6646                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6647                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6648                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6649                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6650                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6651                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6652                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6653                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6654                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6655                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6656                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6657                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6658                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6659                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6660                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6661                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6662                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6663                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6664                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6665                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6666                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6667                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6668                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6669                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6670                 </fields>
6671                 <links>
6672                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6673                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6674                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6675                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6676                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6677                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6678                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6679                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6680                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6681                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6682                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6683                 </links>
6684                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6685                         <actions>
6686                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6687                         </actions>
6688                 </permacrud>
6689         </class>
6690         <class id="aahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::aged_hold_request" oils_persist:tablename="action.aged_hold_request" reporter:core="true" reporter:label="Aged Hold Request">
6691                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6692                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6693                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6694                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6695                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6696                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6697                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6698                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6699                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6700                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6701                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6702                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6703                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6704                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6705                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6706                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6707                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6708                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6709                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6710                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6711                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6712                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6713                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6714                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6715                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6716                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6717                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6718                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6719                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6720                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6721                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6722                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6723                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6724                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6725                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6726                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6727                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6728                 </fields>
6729                 <links>
6730                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6731                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6732                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6733                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6734                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6735                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6736                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6737                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6738                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6739                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6740                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6741                 </links>
6742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6743                         <actions>
6744                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6745                         </actions>
6746                 </permacrud>
6747         </class>
6748
6749         <class id="aou" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit" oils_persist:tablename="actor.org_unit" reporter:label="Organizational Unit" oils_persist:field_safe="true">
6750                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6751                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6752                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6753                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6754                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6755                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6756                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6757                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
6758                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
6759                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6760                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6761                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6762                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6763                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6764                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
6765                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6766                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6767                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6768                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6769                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6770                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6771                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6772                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6773                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6774                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6775                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6776                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6777                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6778                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6779                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6780                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6781                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6782                 </fields>
6783                 <links>
6784                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6785                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6786                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6787                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6788                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6789                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6790                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6791                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6792                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6793                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6794                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6795                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6796                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6797                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6798                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6799                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6800                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6801                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6802                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6803                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6804                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6805                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6806                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6807                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6808                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6809                 </links>
6810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6811             <actions>
6812                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6813                 <retrieve />
6814                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6815                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6816             </actions>
6817         </permacrud>
6818         </class>
6819         <class id="aouct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree" oils_persist:tablename="actor.org_unit_custom_tree" reporter:label="Org Unit Custom Tree">
6820                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6821                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6822                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6823                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6824                 </fields>
6825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6826                         <actions>
6827                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6828                                 <retrieve/>
6829                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6830                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6831                         </actions>
6832                 </permacrud>
6833         </class>
6834         <class id="aouctn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree_node" oils_persist:tablename="actor.org_unit_custom_tree_node" reporter:label="Org Unit Custom Tree Node">
6835                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6836                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6837                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6838                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6839                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6840                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6841                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6842                 </fields>
6843                 <links>
6844                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6845                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6846                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6847                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6848                 </links>
6849                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6850                         <actions>
6851                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6852                                 <retrieve/>
6853                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6854                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6855                         </actions>
6856                 </permacrud>
6857         </class>
6858         <class id="ccnb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
6859                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6860                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6861                         <field name="btype" reporter:datatype="text"/>
6862                         <field name="id" reporter:datatype="id" />
6863                         <field name="name"  reporter:datatype="text"/>
6864                         <field name="description" reporter:datatype="text"/>
6865                         <field name="owner" reporter:datatype="link"/>
6866                         <field name="pub" reporter:datatype="bool"/>
6867                         <field name="create_time" reporter:datatype="timestamp" />
6868                         <field name="owning_lib" reporter:datatype="org_unit" />
6869                 </fields>
6870                 <links>
6871                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6872                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6873                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6874                 </links>
6875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6876                         <actions>
6877                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6878                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6879                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6880                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6881                         </actions>
6882                 </permacrud>
6883         </class>
6884         <class id="ccnbn" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_note" oils_persist:tablename="container.call_number_bucket_note" reporter:label="Call Number Bucket Note">
6885                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6886                         <field name="id" reporter:datatype="id" />
6887                         <field name="bucket" reporter:datatype="link"/>
6888                         <field name="note" reporter:datatype="text" />
6889                 </fields>
6890                 <links>
6891                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6892                 </links>
6893         </class>
6894         <class id="asc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
6895                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6896                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6897                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6898                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6899                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6900                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6901                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6902                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6903                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6904                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6905                 </fields>
6906                 <links>
6907                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6908                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6909                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6910                 </links>
6911                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6912                         <actions>
6913                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6914                         </actions>
6915                 </permacrud>
6916         </class>
6917         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6918                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6919                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6920                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6921                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6922                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6923                 </fields>
6924                 <links>
6925                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6926                 </links>
6927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6928                         <actions>
6929                                 <retrieve permission="VIEW_USER user_request.view">
6930                                         <context link="usr" field="home_ou" />
6931                                 </retrieve>
6932                         </actions>
6933                 </permacrud>
6934         </class>
6935     <class id="actscsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat_sip_fields" oils_persist:tablename="actor.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
6936         <fields oils_persist:primary="field">
6937             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6938             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6939             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6940         </fields>
6941         <links/>
6942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6943             <actions>
6944                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6945                 <retrieve />
6946                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6947                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6948             </actions>
6949         </permacrud>
6950     </class>
6951         <class id="actsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat" oils_persist:tablename="actor.stat_cat" reporter:label="User Statistical Category">
6952                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6953                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6954                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6955                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6956                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6957                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6958                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6959                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6960                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6961                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6962                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6963                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6964                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6965                 </fields>
6966                 <links>
6967                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6968                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6969                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6970                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6971                 </links>
6972         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6973             <actions>
6974                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6975                 <retrieve />
6976                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6977                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6978             </actions>
6979         </permacrud>
6980         </class>
6981         <class id="msefe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::series_field_entry" oils_persist:tablename="metabib.series_field_entry" reporter:label="Series Field Entry">
6982                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6983                         <field name="field" reporter:datatype="link"/>
6984                         <field name="id" reporter:datatype="id" />
6985                         <field name="source" reporter:datatype="link"/>
6986                         <field name="value"  reporter:datatype="text"/>
6987                 </fields>
6988                 <links>
6989                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6990                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6991                 </links>
6992         </class>
6993         <class id="cub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6994                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6995                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6996                         <field name="btype" reporter:datatype="text"/>
6997                         <field name="id" reporter:datatype="id" />
6998                         <field name="name"  reporter:datatype="text"/>
6999                         <field name="description" reporter:datatype="text"/>
7000                         <field name="owner" reporter:datatype="link"/>
7001                         <field name="pub" reporter:datatype="bool"/>
7002                         <field name="create_time" reporter:datatype="timestamp" />
7003                         <field name="owning_lib" reporter:datatype="org_unit" />
7004                 </fields>
7005                 <links>
7006                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7007                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7008                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7009                 </links>
7010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7011                         <actions>
7012                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7013                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7014                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7015                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7016                         </actions>
7017                 </permacrud>
7018         </class>
7019         <class id="cubn" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_note" oils_persist:tablename="container.user_bucket_note" reporter:label="User Bucket Note">
7020                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7021                         <field name="id" reporter:datatype="id" />
7022                         <field name="bucket" reporter:datatype="link"/>
7023                         <field name="note" reporter:datatype="text" />
7024                 </fields>
7025                 <links>
7026                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7027                 </links>
7028         </class>
7029         <class id="mcrp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
7030                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7031                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7032                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7033                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7034                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7035                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7036                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7037                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7038                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7039                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7040                 </fields>
7041                 <links>
7042                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7043                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7044                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7045                 </links>
7046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7047             <actions>
7048                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7049                     <context link="xact" jump="usr" field="home_ou"/>
7050                 </retrieve>
7051                         </actions>
7052                 </permacrud>
7053         </class>
7054         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7055                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7056                         <field name="id" reporter:datatype="id" />
7057                         <field name="ind1" />
7058                         <field name="ind2" />
7059                         <field name="record" />
7060                         <field name="subfield" />
7061                         <field name="tag" />
7062                         <field name="value" />
7063                 </fields>
7064                 <links>
7065                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7066                 </links>
7067         </class>
7068         <class id="aalink" controller="open-ils.cstore" oils_obj:fieldmapper="authority::authority_linking" oils_persist:tablename="authority.authority_linking" reporter:label="Authority to Authority Linking">
7069                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7070                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7071                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7072                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7073                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7074                 </fields>
7075                 <links>
7076                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7077                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7078                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7079                 </links>
7080         </class>
7081         <class id="cnct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
7082                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7083                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7084                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7085                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7086                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7087                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7088                 </fields>
7089                 <links>
7090                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7091                 </links>
7092         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7093             <actions>
7094                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7095                 <retrieve/>
7096                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7097                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7098             </actions>
7099         </permacrud>
7100
7101         </class>
7102         <class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type" oils_persist:field_safe="true">
7103                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7104                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7105                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7106                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7107                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7108                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7109                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7110                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7111                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7112                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7113                 </fields>
7114                 <links>
7115                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7116                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7117                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7118                 </links>
7119         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7120             <actions>
7121                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7122                 <retrieve/>
7123                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7124                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7125             </actions>
7126         </permacrud>
7127         </class>
7128         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7129                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7130                         <field name="create_date" reporter:datatype="timestamp"/>
7131                         <field name="creator" reporter:datatype="link"/>
7132                         <field name="edit_date" reporter:datatype="timestamp"/>
7133                         <field name="editor" reporter:datatype="link"/>
7134                         <field name="id" reporter:datatype="id" />
7135                         <field name="pub" reporter:datatype="bool"/>
7136                         <field name="record" reporter:datatype="link"/>
7137                         <field name="value"  reporter:datatype="text"/>
7138                 </fields>
7139                 <links>
7140                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7141                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7142                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7143                 </links>
7144         </class>
7145         <class id="mucs" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_circulation_summary" oils_persist:tablename="money.usr_circulation_summary" reporter:label="User Circulation Summary">
7146                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7147                         <field name="balance_owed" reporter:datatype="money" />
7148                         <field name="total_owed" reporter:datatype="money" />
7149                         <field name="total_paid" reporter:datatype="money" />
7150                         <field name="usr" reporter:datatype="link"/>
7151                 </fields>
7152                 <links>
7153                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7154                 </links>
7155         </class>
7156     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7157                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7158                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7159                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7160                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7161                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7162                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7163                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7164                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7165                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7166                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7167                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7168                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7169                 </fields>
7170                 <links>
7171                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7172                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7173                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7174                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7175                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7176                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7177                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7178                 </links>
7179         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7180             <actions>
7181                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7182             </actions>
7183         </permacrud>
7184         </class>
7185         <class id="cbs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_source" oils_persist:tablename="config.bib_source" reporter:label="Bib Source">
7186                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7187                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7188                         <field name="quality" reporter:datatype="int" />
7189                         <field name="source" reporter:datatype="text"/>
7190                         <field name="transcendant" reporter:datatype="bool"/>
7191                         <field name="can_have_copies" reporter:datatype="bool"/>
7192                 </fields>
7193                 <links/>
7194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7195             <actions>
7196                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7197                 <retrieve/>
7198                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7199                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7200             </actions>
7201         </permacrud>
7202         </class>
7203         <class id="mbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
7204                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7205                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7206                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7207                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7208                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7209                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7210                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7211                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7212                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7213                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7214                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7215                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7216                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7217                 </fields>
7218                 <links>
7219                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7220                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7221                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7222                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7223                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7224                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7225                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7226                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7227                 </links>
7228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7229                         <actions>
7230                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7231                                         <context link="usr" field="home_ou" />
7232                                 </retrieve>
7233                         </actions>
7234                 </permacrud>
7235         </class>
7236         <class id="actsce" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry" oils_persist:tablename="actor.stat_cat_entry" reporter:label="User Stat Cat Entry">
7237                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7238                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7239                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7240                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7241                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7242                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7243                 </fields>
7244                 <links>
7245                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7246                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7247                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7248                 </links>
7249         </class>
7250         <class id="actsced" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_default" oils_persist:tablename="actor.stat_cat_entry_default" reporter:label="User Stat Cat Default Entry">
7251                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7252                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7253                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7254                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7255                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7256                 </fields>
7257                 <links>
7258                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7259                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7260                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7261                 </links>
7262         </class>
7263         <class id="cubi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
7264                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7265                         <field name="bucket" reporter:datatype="link"/>
7266                         <field name="id" reporter:datatype="id" />
7267                         <field name="target_user" reporter:datatype="link"/>
7268                         <field name="create_time" reporter:datatype="timestamp" />
7269                         <field name="pos" reporter:datatype="int" />
7270                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7271                 </fields>
7272                 <links>
7273                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7274                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7275             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7276                 </links>
7277                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7278                         <actions>
7279                                 <retrieve permission="ADMIN_USER_BUCKET">
7280                     <context link="bucket" owning_lib="owning_lib"/>
7281                 </retrieve>
7282             </actions>
7283         </permacrud>
7284         </class>
7285         <class id="cubin" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item_note" oils_persist:tablename="container.user_bucket_item_note" reporter:label="User Bucket Item Note">
7286                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7287                         <field name="id" reporter:datatype="id" />
7288                         <field name="item" reporter:datatype="link"/>
7289                         <field name="note" reporter:datatype="text" />
7290                 </fields>
7291                 <links>
7292                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7293                 </links>
7294         </class>
7295         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7296                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7297                         <field name="balance_owed" reporter:datatype="money" />
7298                         <field name="total_owed" reporter:datatype="money" />
7299                         <field name="total_paid" reporter:datatype="money" />
7300                         <field name="usr" reporter:datatype="link"/>
7301                 </fields>
7302                 <links>
7303                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7304                 </links>
7305         </class>
7306         <class id="clfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::lit_form_map" oils_persist:tablename="config.lit_form_map" reporter:label="Literary Form" oils_persist:field_safe="true">
7307                 <fields oils_persist:primary="code" oils_persist:sequence="">
7308                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7309                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7310                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7311                 </fields>
7312                 <links/>
7313         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7314             <actions>
7315                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7316                 <retrieve/>
7317                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7318                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7319             </actions>
7320         </permacrud>
7321         </class>
7322         <class id="mwp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
7323                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7324                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7325                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7326                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7327                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7328                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7329                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7330                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7331                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7332                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7333                 </fields>
7334                 <links>
7335                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7336                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7337                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7338                 </links>
7339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7340             <actions>
7341                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7342                     <context link="xact" jump="usr" field="home_ou"/>
7343                 </retrieve>
7344                         </actions>
7345                 </permacrud>
7346         </class>
7347         <class id="mgp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
7348                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7349                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7350                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7351                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7352                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7353                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7354                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7355                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7356                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7357                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7358                 </fields>
7359                 <links>
7360                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7361                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7362                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7363                 </links>
7364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7365             <actions>
7366                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7367                     <context link="xact" jump="usr" field="home_ou"/>
7368                 </retrieve>
7369                         </actions>
7370                 </permacrud>
7371         </class>
7372         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7373                 <fields oils_persist:primary="id" oils_persist:sequence="">
7374                         <field name="checkin_lib" reporter:datatype="link"/>
7375                         <field name="checkin_staff" reporter:datatype="link"/>
7376                         <field name="checkin_time" reporter:datatype="timestamp"/>
7377                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7378                         <field name="circ_staff" reporter:datatype="link"/>
7379                         <field name="desk_renewal" reporter:datatype="bool"/>
7380                         <field name="due_date" reporter:datatype="timestamp"/>
7381                         <field name="duration" reporter:datatype="interval"/>
7382                         <field name="duration_rule" reporter:datatype="link"/>
7383                         <field name="fine_interval" reporter:datatype="interval"/>
7384                         <field name="id" reporter:datatype="id" />
7385                         <field name="max_fine" reporter:datatype="money" />
7386                         <field name="max_fine_rule" reporter:datatype="link"/>
7387                         <field name="opac_renewal" reporter:datatype="bool"/>
7388                         <field name="phone_renewal" reporter:datatype="bool"/>
7389                         <field name="recurring_fine" reporter:datatype="money" />
7390                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7391                         <field name="renewal_remaining" reporter:datatype="int" />
7392             <field name="grace_period" reporter:datatype="interval" />
7393                         <field name="stop_fines" reporter:datatype="text"/>
7394                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7395                         <field name="target_copy" reporter:datatype="link"/>
7396                         <field name="usr" reporter:datatype="link"/>
7397                         <field name="xact_finish" reporter:datatype="timestamp" />
7398                         <field name="xact_start" reporter:datatype="timestamp" />
7399                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7400                         <field name="auto_renewal" reporter:datatype="bool"/>
7401                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7402                 </fields>
7403                 <links>
7404                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7405                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7406                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7407                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7408                 </links>
7409         </class>
7410         <class id="msfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::subject_field_entry" oils_persist:tablename="metabib.subject_field_entry" reporter:label="Subject Field Entry">
7411                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7412                         <field name="field" reporter:datatype="link"/>
7413                         <field name="id" reporter:datatype="id" />
7414                         <field name="source" reporter:datatype="link"/>
7415                         <field name="value" reporter:datatype="text"/>
7416                 </fields>
7417                 <links>
7418                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7419                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7420                 </links>
7421         </class>
7422         <class id="crrf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::recurring_fine" oils_persist:tablename="config.rule_recurring_fine" reporter:label="Recurring Fine Rule">
7423                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7424                         <field name="high" reporter:datatype="money" />
7425                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7426                         <field name="low" reporter:datatype="money" />
7427                         <field name="name" reporter:datatype="text"/>
7428                         <field name="normal" reporter:datatype="money" />
7429                         <field name="recurrence_interval" reporter:datatype="interval"/>
7430             <field name="grace_period" reporter:datatype="interval" />
7431                 </fields>
7432                 <links/>
7433         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7434             <actions>
7435                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7436                 <retrieve/>
7437                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7438                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7439             </actions>
7440         </permacrud>
7441         </class>
7442         <class id="mckp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
7443                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7444                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7445                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7446                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7447                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7448                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7449                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7450                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7451                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7452                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7453                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7454                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7455                 </fields>
7456                 <links>
7457                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7458                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7459                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7460                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7461                 </links>
7462         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7463             <actions>
7464                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7465                     <context link="xact" jump="usr" field="home_ou"/>
7466                 </retrieve>
7467                         </actions>
7468                 </permacrud>
7469         </class>
7470         <class id="acp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy" oils_persist:tablename="asset.copy" reporter:core="true" reporter:label="Item">
7471                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7472                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7473                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7474                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7475                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7476                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7477                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7478                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7479                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7480                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7481                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7482                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7483                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7484                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7485                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7486                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7487                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7488                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7489                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7490                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7491                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7492                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7493                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7494                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
7495                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7496                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7497                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7498                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7499                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7500                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7501                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7502                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7503                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7504                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7505                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7506                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7507                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7508                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7509                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7510                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7511                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7512                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7513                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7514                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7515                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7516                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7517                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7518                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7519                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7520                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7521                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7522                 </fields>
7523                 <links>
7524                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7525                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7526                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7527                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7528                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7529                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7530                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7531                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7532                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7533                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7534                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7535                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7536                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7537                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7538                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7539                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7540                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7541                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7542                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7543                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7544                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7545                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7546                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7547                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7548                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7549                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7550                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7551                 </links>
7552         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7553             <actions>
7554                 <create permission="CREATE_COPY">
7555                     <context link="call_number" field="owning_lib"/>
7556                 </create>
7557                 <retrieve/>
7558                 <update permission="UPDATE_COPY">
7559                     <context link="call_number" field="owning_lib"/>
7560                 </update>
7561                 <delete permission="DELETE_COPY">
7562                     <context link="call_number" field="owning_lib"/>
7563                 </delete>
7564             </actions>
7565         </permacrud>
7566         </class>
7567
7568         <class id="alci" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::latest_inventory" oils_persist:tablename="asset.latest_inventory" reporter:core="true" reporter:label="Latest Inventory">
7569                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7570             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7571                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7572                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7573                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7574                 </fields>
7575                 <links>
7576                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7577                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7578                 </links>
7579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7580             <actions>
7581                                 <create/>
7582                                 <retrieve/>
7583                                 <update/>
7584                                 <delete/>
7585             </actions>
7586         </permacrud>
7587         </class>
7588
7589         <class id="ccat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_alert_type" oils_persist:tablename="config.copy_alert_type" reporter:label="Copy Alert Type" oils_persist:restrict_primary="100">
7590                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7591                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7592                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7593                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7594                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7595                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7596                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7597                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7598                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7599                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7600                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7601                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7602                 </fields>
7603                 <links>
7604                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7605                 </links>
7606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7607             <actions>
7608                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7609                 <retrieve/>
7610                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7611                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7612             </actions>
7613         </permacrud>
7614         </class>
7615
7616         <class id="acas" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::copy_alert_suppress" oils_persist:tablename="actor.copy_alert_suppress" reporter:label="Copy Alert Suppression">
7617                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7618                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7619                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7620                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7621                 </fields>
7622                 <links>
7623                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7624                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7625                 </links>
7626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7627             <actions>
7628                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7629                 <retrieve/>
7630                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7631                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7632             </actions>
7633         </permacrud>
7634         </class>
7635
7636         <class id="aca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_alert" oils_persist:tablename="asset.copy_alert" reporter:label="Copy Alert">
7637                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7638                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7639                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7640                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7641                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7642                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7643                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7644                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7645                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7646                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7647                 </fields>
7648                 <links>
7649                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7650                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7651                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7652                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7653                 </links>
7654         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7655             <actions>
7656                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7657                     <context link="copy" field="circ_lib"/>
7658                 </create>
7659                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7660                     <context link="copy" field="circ_lib"/>
7661                                 </retrieve>
7662                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7663                     <context link="copy" field="circ_lib"/>
7664                                 </update>
7665                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7666                     <context link="copy" field="circ_lib"/>
7667                                 </delete>
7668             </actions>
7669         </permacrud>
7670         </class>
7671
7672         <class id="aaca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::active_copy_alert" oils_persist:tablename="asset.active_copy_alert" reporter:label="Active Copy Alert" oils_persist:readonly="true">
7673                 <fields oils_persist:primary="id">
7674                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7675                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7676                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7677                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7678                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7679                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7680                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7681                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7682                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7683                 </fields>
7684                 <links>
7685                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7686                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7687                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7688                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7689                 </links>
7690         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7691             <actions>
7692                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7693                     <context link="copy" field="circ_lib"/>
7694                 </create>
7695                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7696                     <context link="copy" field="circ_lib"/>
7697                                 </retrieve>
7698                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7699                     <context link="copy" field="circ_lib"/>
7700                                 </update>
7701                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7702                     <context link="copy" field="circ_lib"/>
7703                                 </delete>
7704             </actions>
7705         </permacrud>
7706         </class>
7707
7708         <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">
7709                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7710                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7711                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7712                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7713                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7714                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7715                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7716                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7717                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7718                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7719                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7720                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7721                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7722                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7723                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7724                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7725                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7726                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7727                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7728                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7729                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7730                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7731                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7732                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7733                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7734                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7735                 </fields>
7736                 <links>
7737                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7738                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7739                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7740                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7741                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7742                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7743                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7744                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7745                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7746                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7747                 </links>
7748                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7749                         <actions>
7750                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7751                                 <retrieve />
7752                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7753                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7754                         </actions>
7755                 </permacrud>
7756         </class>
7757
7758         <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">
7759                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7760                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7761                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7762                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7763                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7764                 </fields>
7765                 <links/>
7766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7767             <actions>
7768                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7769                 <retrieve/>
7770                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7771                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7772             </actions>
7773         </permacrud>
7774         </class>
7775         <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">
7776                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7777                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7778                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7779                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7780                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7781                 </fields>
7782                 <links/>
7783         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7784             <actions>
7785                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7786                 <retrieve/>
7787                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7788                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7789             </actions>
7790         </permacrud>
7791         </class>
7792         <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">
7793                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7794                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7795                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7796                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7797                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7798                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7799                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7800                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7801                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7802                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7803                 </fields>
7804                 <links>
7805                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7806                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7807                 </links>
7808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7809             <actions>
7810                 <create permission="CREATE_PERM" global_required="true"/>
7811                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7812                 <update permission="UPDATE_PERM" global_required="true"/>
7813                 <delete permission="DELETE_PERM" global_required="true"/>
7814             </actions>
7815         </permacrud>
7816         </class>
7817         <class id="pgtde" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree_display_entry" oils_persist:tablename="permission.grp_tree_display_entry" reporter:label="Permission Group Tree Display Entry">
7818                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
7819                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7820                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
7821                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7822                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
7823                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7824                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7825                 </fields>
7826                 <links>
7827                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
7828                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7829                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7830                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
7831                 </links>
7832                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7833                         <actions>
7834                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7835                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7836                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7837                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7838                         </actions>
7839                 </permacrud>
7840         </class>
7841         <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">
7842                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7843                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7844                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7845                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7846                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7847                 </fields>
7848                 <links>
7849                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7850                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7851                 </links>
7852         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7853             <actions>
7854                 <create permission="ADMIN_SURVEY">
7855                     <context link="question" jump="survey" field="owner"/>
7856                 </create>
7857                 <retrieve/>
7858                 <update permission="ADMIN_SURVEY">
7859                     <context link="question" jump="survey" field="owner"/>
7860                 </update>
7861                 <delete permission="ADMIN_SURVEY">
7862                     <context link="question" jump="survey" field="owner"/>
7863                 </delete>
7864             </actions>
7865         </permacrud>
7866         </class>
7867         <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">
7868                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7869                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7870                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7871                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7872                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7873                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7874                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7875                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7876                 </fields>
7877                 <links>
7878                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7879                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7880                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7881                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7882                 </links>
7883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7884                         <actions>
7885                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7886                         </actions>
7887                 </permacrud>
7888         </class>
7889         <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">
7890                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7891                         <field name="balance_owed" reporter:datatype="money" />
7892                         <field name="total_owed" reporter:datatype="money" />
7893                         <field name="total_paid" reporter:datatype="money" />
7894                         <field name="usr" reporter:datatype="link"/>
7895                 </fields>
7896                 <links>
7897                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7898                 </links>
7899         </class>
7900         <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">
7901                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7902                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7903                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7904                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7905                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7906                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7907                 </fields>
7908                 <links>
7909                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7910                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7911                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7912                 </links>
7913         </class>
7914         <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">
7915                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7916                         <field name="field" reporter:datatype="link"/>
7917                         <field name="id" reporter:datatype="id" />
7918                         <field name="source" reporter:datatype="link"/>
7919                         <field name="value" reporter:datatype="text"/>
7920                 </fields>
7921                 <links>
7922                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7923                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7924                 </links>
7925         </class>
7926         <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">
7927                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7928                         <field name="field" reporter:datatype="link"/>
7929                         <field name="id" reporter:datatype="id" />
7930                         <field name="source" reporter:datatype="link"/>
7931                         <field name="value" reporter:datatype="text"/>
7932                 </fields>
7933                 <links>
7934                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7935                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7936                 </links>
7937         </class>
7938         <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">
7939                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7940                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7941                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7942                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7943                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7944                 </fields>
7945                 <links>
7946                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7947                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7948                 </links>
7949         </class>
7950         <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">
7951                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7952                         <field name="depth" reporter:datatype="int" />
7953                         <field name="grantable" reporter:datatype="bool"/>
7954                         <field name="grp" reporter:datatype="link"/>
7955                         <field name="id" reporter:datatype="id" />
7956                         <field name="perm" reporter:datatype="link"/>
7957                 </fields>
7958                 <links>
7959                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7960                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7961                 </links>
7962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7963             <actions>
7964                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7965                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7966                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7967                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7968             </actions>
7969         </permacrud>
7970         </class>
7971         <class id="ccb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7972                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7973                         <field name="items" oils_persist:virtual="true" />
7974                         <field name="btype" reporter:datatype="text"/>
7975                         <field name="id" reporter:datatype="id" />
7976                         <field name="name" reporter:datatype="text"/>
7977                         <field name="description" reporter:datatype="text"/>
7978                         <field name="owner" reporter:datatype="link"/>
7979                         <field name="pub" reporter:datatype="bool"/>
7980                         <field name="create_time" reporter:datatype="timestamp" />
7981                         <field name="owning_lib" reporter:datatype="org_unit" />
7982                 </fields>
7983                 <links>
7984                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7985                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7986                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7987                 </links>
7988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7989                         <actions>
7990                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7991                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7992                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7993                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7994                         </actions>
7995                 </permacrud>
7996         </class>
7997         <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">
7998                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7999                         <field name="id" reporter:datatype="id" />
8000                         <field name="bucket" reporter:datatype="link"/>
8001                         <field name="note" reporter:datatype="text" />
8002                 </fields>
8003                 <links>
8004                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8005                 </links>
8006         </class>
8007         <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">
8008                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8009                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8010                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8011                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8012                 </fields>
8013                 <links>
8014                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8015                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8016                 </links>
8017         </class>
8018         <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">
8019                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8020                         <field name="depth" reporter:datatype="int"/>
8021                         <field name="grantable" reporter:datatype="bool"/>
8022                         <field name="id" reporter:datatype="id" />
8023                         <field name="perm" reporter:datatype="link"/>
8024                         <field name="usr" reporter:datatype="link"/>
8025                 </fields>
8026                 <links>
8027                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8028                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8029                 </links>
8030         </class>
8031         <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">
8032                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8033                         <field name="object_id" reporter:datatype="text"/>
8034                         <field name="grantable" reporter:datatype="bool"/>
8035                         <field name="id" reporter:datatype="id" />
8036                         <field name="perm" reporter:datatype="link"/>
8037                         <field name="usr" reporter:datatype="link"/>
8038                         <field name="object_type" reporter:datatype="text"/>
8039                 </fields>
8040                 <links>
8041                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8042                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8043                 </links>
8044         </class>
8045         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:label="Payments">
8046                 <fields oils_persist:primary="id" oils_persist:sequence="">
8047                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8048                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8049                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8050                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8051                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8052                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8053                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8054                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8055                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8056                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8057                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8058                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8059                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8060                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8061                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8062                 </fields>
8063                 <links>
8064                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8065                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8066                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8067                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8068                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8069                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8070                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8071                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8072                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8073                 </links>
8074         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8075             <actions>
8076                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8077                     <context link="xact" jump="usr" field="home_ou"/>
8078                 </retrieve>
8079                         </actions>
8080                 </permacrud>
8081         </class>
8082         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8083                 oils_obj:fieldmapper="money::aged_payment" 
8084                 oils_persist:tablename="money.aged_payment" 
8085                 reporter:label="Payments: Aged">
8086                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8087                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8088                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8089                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8090                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8091                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8092                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8093                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8094                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8095                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8096                         <field name="billing" reporter:datatype="link"/>
8097                 </fields>
8098                 <links>
8099                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8100                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8101                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8102                         <link field="billing" reltype="has_a" key="id" class="mab"/>
8103                 </links>
8104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8105                         <actions>
8106                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8107                                         <context link="xact" field="usr_home_ou"/>
8108                                 </retrieve>
8109                         </actions>
8110                 </permacrud>
8111         </class>
8112         <class id="mallp" controller="open-ils.cstore" 
8113                 oils_obj:fieldmapper="money::all_payments" 
8114                 oils_persist:tablename="money.all_payments" 
8115                 oils_persist="readonly" reporter:core="true"
8116                 reporter:label="Payments: All">
8117                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8118                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8119                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8120                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8121                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8122                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8123                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8124                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8125                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8126                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8127                         <field name="billing" reporter:datatype="link"/>
8128                 </fields>
8129                 <links>
8130                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8131                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8132                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8133                         <link field="billing" reltype="has_a" key="id" class="mallb"/>
8134                 </links>
8135         </class>
8136
8137         <class id="mbp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
8138                 <fields oils_persist:primary="id" oils_persist:sequence="">
8139                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8140                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8141                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8142                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8143                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8144                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8145                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8146                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8147                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8148                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8149                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8150                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8151                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8152                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8153                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8154                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8155                 </fields>
8156                 <links>
8157                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8158                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8159                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8160                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8161                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8162                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8163                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8164                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8165                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8166                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8167                 </links>
8168                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8169                         <actions>
8170                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8171                                         <context link="xact" jump="usr" field="home_ou"/>
8172                                 </retrieve>
8173                         </actions>
8174                 </permacrud>
8175         </class>
8176         <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">
8177                 <fields oils_persist:primary="id" oils_persist:sequence="">
8178                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8179                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8180                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8181                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8182                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8183                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8184                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8185                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8186                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8187                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8188                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8189                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8190                 </fields>
8191                 <links>
8192                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8193                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8194                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8195                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8196                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8197                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8198                 </links>
8199         </class>
8200         <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">
8201                 <fields oils_persist:primary="id" oils_persist:sequence="">
8202                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8203                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8204                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8205                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8206                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8207                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8208                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8209                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8210                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8211                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8212                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8213                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8214                 </fields>
8215                 <links>
8216                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8217                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8218                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8219                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8220                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8221                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8222                 </links>
8223         </class>
8224         <class id="cbrebi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">
8225                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8226                         <field name="bucket" reporter:datatype="link"/>
8227                         <field name="id" reporter:datatype="id" />
8228                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8229                         <field name="create_time" reporter:datatype="timestamp" />
8230                         <field name="pos" reporter:datatype="int" />
8231                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8232                 </fields>
8233                 <links>
8234                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8235                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8236             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8237                 </links>
8238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8239                         <actions>
8240                                 <retrieve permission="ADMIN_COPY_BUCKET">
8241                     <context link="bucket" owning_lib="owning_lib"/>
8242                 </retrieve>
8243             </actions>
8244         </permacrud>
8245         </class>
8246         <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">
8247                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8248                         <field name="id" reporter:datatype="id" />
8249                         <field name="item" reporter:datatype="link"/>
8250                         <field name="note" reporter:datatype="text" />
8251                 </fields>
8252                 <links>
8253                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8254                 </links>
8255         </class>
8256         <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">
8257                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8258                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8259                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8260                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8261                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8262                 </fields>
8263                 <links>
8264                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8265                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8266                 </links>
8267                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8268                         <actions>
8269                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8270                         </actions>
8271                 </permacrud>
8272         </class>
8273     <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">
8274         <fields oils_persist:primary="field">
8275             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8276             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8277             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8278         </fields>
8279         <links/>
8280         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8281             <actions>
8282                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8283                 <retrieve />
8284                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8285                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8286             </actions>
8287         </permacrud>
8288     </class>
8289         <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">
8290                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8291                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8292                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8293                 </fields>
8294                 <links/>
8295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8296             <actions>
8297                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8298                 <retrieve/>
8299                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8300                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8301             </actions>
8302         </permacrud>
8303         </class>
8304
8305
8306         <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">
8307                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8308                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8309                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8310                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8311                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8312                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8313                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8314                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8315                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8316                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8317                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8318                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8319                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8320                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8321                 </fields>
8322                 <links>
8323                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8324                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8325                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8326                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8327                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8328                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8329                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8330                 </links>
8331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8332             <actions>
8333                 <create permission="TRANSIT_COPY">
8334                     <context link="target_copy" field="owner"/>
8335                 </create>
8336                 <retrieve/>
8337                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8338                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8339             </actions>
8340         </permacrud>
8341         </class>
8342         <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">
8343                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8344                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8345                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8346                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8347                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8348                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8349                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8350                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8351                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8352                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8353                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8354                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8355                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8356                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8357                 </fields>
8358                 <links>
8359                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8360                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8361                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8362                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8363                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8364                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8365                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8366                 </links>
8367         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8368             <actions>
8369                 <create permission="TRANSIT_COPY" context_field="owner">
8370                     <context link="target_copy" field="circ_lib"/>
8371                 </create>
8372                 <retrieve/>
8373                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8374                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8375             </actions>
8376         </permacrud>
8377         </class>
8378         <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">
8379                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8380                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8381                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8382                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8383                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8384                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8385                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8386                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8387                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8388                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8389                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8390                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8391                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8392                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8393                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8394                 </fields>
8395                 <links>
8396                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8397                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8398                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8399                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8400                 </links>
8401         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8402             <actions>
8403                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8404                     <context link="xact" jump="usr" field="home_ou"/>
8405                 </retrieve>
8406                         </actions>
8407                 </permacrud>
8408         </class>
8409         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8410                 oils_obj:fieldmapper="money::aged_billing" 
8411                 oils_persist:tablename="money.aged_billing" 
8412                 reporter:label="Aged Billing Line Item">
8413                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8414                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8415                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8416                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8417                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8418                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8419                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8420                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8421                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8422                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8423                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8424                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8425                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8426                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8427                 </fields>
8428                 <links>
8429                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8430                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8431                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8432                 </links>
8433                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8434                         <actions>
8435                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8436                                         <context link="xact" field="usr_home_ou"/>
8437                                 </retrieve>
8438                         </actions>
8439                 </permacrud>
8440         </class>
8441         <class id="mallb" controller="open-ils.cstore" 
8442                 oils_obj:fieldmapper="money::all_billings" 
8443                 oils_persist:tablename="money.all_billings" 
8444                 oils_persist="readonly" reporter:label="All Billing Line Items">
8445                 <fields oils_persist:primary="id" oils_persist:sequence="">
8446                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8447                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8448                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8449                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8450                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8451                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8452                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8453                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8454                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8455                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8456                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8457                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8458                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8459                 </fields>
8460                 <links>
8461                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8462                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8463                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8464                 </links>
8465         </class>
8466         <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">
8467                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8468                         <field name="grp" />
8469                         <field name="id" reporter:datatype="id" />
8470                         <field name="usr" />
8471                 </fields>
8472                 <links>
8473                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8474                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8475                 </links>
8476         </class>
8477         <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">
8478                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8479                         <field name="id" reporter:datatype="id" />
8480                         <field name="fq_field" reporter:datatype="text"/>
8481                         <field name="identity_value" reporter:datatype="text"/>
8482                         <field name="translation" reporter:datatype="text"/>
8483                         <field name="string" reporter:datatype="text"/>
8484                 </fields>
8485                 <links>
8486                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8487                 </links>
8488         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8489             <actions>
8490                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8491                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8492                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8493                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8494             </actions>
8495         </permacrud>
8496         </class>
8497         <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">
8498                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8499                         <field name="id" reporter:datatype="id" />
8500                         <field name="fm_class" reporter:datatype="text"/>
8501                         <field name="field" reporter:datatype="text"/>
8502                         <field name="owner" reporter:datatype="org_unit"/>
8503                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8504                 </fields>
8505                 <links>
8506                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8507                 </links>
8508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8509             <actions>
8510                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8511                 <retrieve/>
8512                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8513                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8514             </actions>
8515         </permacrud>
8516         </class>
8517         <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">
8518                 <fields oils_persist:primary="code">
8519                         <field name="code" reporter:datatype="id" />
8520                         <field name="marc_code" reporter:datatype="text"/>
8521                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8522                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8523                         <field name="rtl" reporter:datatype="bool"/>
8524                 </fields>
8525                 <links/>
8526         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8527             <actions>
8528                 <create permission="CREATE_LOCALE" global_required="true"/>
8529                 <retrieve/>
8530                 <update permission="UPDATE_LOCALE" global_required="true"/>
8531                 <delete permission="DELETE_LOCALE" global_required="true"/>
8532             </actions>
8533         </permacrud>
8534         </class>
8535         <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">
8536                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8537                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
8538                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
8539                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
8540                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8541                 </fields>
8542                 <links>
8543                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8544                 </links>
8545         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8546             <actions>
8547                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8548                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8549                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8550                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8551             </actions>
8552         </permacrud>
8553         </class>
8554
8555         <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">
8556                 <fields oils_persist:primary="id">
8557                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8558                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8559                 </fields>
8560                 <links/>
8561         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8562             <actions>
8563                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8564                 <retrieve/>
8565                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8566                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8567             </actions>
8568         </permacrud>
8569         </class>
8570
8571         <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">
8572                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8573                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8574                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8575                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8576                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8577                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8578                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8579                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8580                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8581                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8582                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8583                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8584                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8585                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8586                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8587                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8588                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8589                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8590                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8591                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8592                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8593                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8594                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8595                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8596                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8597                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8598                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8599                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8600                 </fields>
8601                 <links>
8602                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8603                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8604                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8605                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8606                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8607                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8608                 </links>
8609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8610             <actions>
8611                 <create permission="user_request.create">
8612                     <context link="usr" field="home_ou"/>
8613                                 </create>
8614                 <retrieve permission="user_request.view">
8615                     <context link="usr" field="home_ou"/>
8616                                 </retrieve>
8617                 <update permission="user_request.update">
8618                     <context link="usr" field="home_ou"/>
8619                                 </update>
8620                 <delete permission="user_request.delete">
8621                     <context link="usr" field="home_ou"/>
8622                                 </delete>
8623             </actions>
8624         </permacrud>
8625         </class>
8626
8627         <class id="aurs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status" reporter:label="User Purchase Request with Status" oils_persist="readonly">
8628         <oils_persist:source_definition><![CDATA[
8629             SELECT r.*, CASE
8630                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
8631                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
8632                         WHEN l.state = 'received' THEN 5 -- Received
8633                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
8634                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
8635                         WHEN l.id IS NOT NULL THEN 2 -- Pending
8636                         WHEN l.id IS NULL THEN 1 -- New
8637                         ELSE 0 -- Error
8638                     END AS request_status
8639                     ,u.home_ou
8640             FROM      acq.user_request r
8641             JOIN actor.usr u ON (r.usr = u.id)
8642             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
8643             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
8644             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
8645         ]]></oils_persist:source_definition>
8646                 <fields oils_persist:primary="id">
8647                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8648                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8649                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8650                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8651                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8652                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8653                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8654                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8655                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8656                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8657                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8658                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8659                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8660                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8661                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8662                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8663                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8664                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8665                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8666                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8667                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8668                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8669                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8670                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8671                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8672                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8673                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8674                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
8675                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
8676                 </fields>
8677                 <links>
8678                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8679                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8680                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8681                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8682                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8683                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8684                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
8685                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8686                 </links>
8687         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8688             <actions>
8689                 <retrieve permission="user_request.view">
8690                     <context link="usr" field="home_ou"/>
8691                                 </retrieve>
8692             </actions>
8693         </permacrud>
8694         </class>
8695
8696         <class id="aurst" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status_type" oils_persist:tablename="acq.user_request_status_type" reporter:label="Acquisition Patron Request Status Type">
8697                 <fields oils_persist:primary="id">
8698                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8699                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8700                 </fields>
8701                 <links/>
8702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8703             <actions>
8704                 <retrieve/>
8705             </actions>
8706         </permacrud>
8707         </class>
8708
8709         <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">
8710                 <fields oils_persist:primary="code">
8711                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8712                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8713                 </fields>
8714                 <links/>
8715         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8716             <actions>
8717                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8718                 <retrieve/>
8719                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8720                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8721             </actions>
8722         </permacrud>
8723         </class>
8724
8725         <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">
8726                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8727                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8728                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8729                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8730                         <field reporter:label="Ratio" name="ratio" />
8731                 </fields>
8732                 <links>
8733                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8734                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8735                 </links>
8736                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8737                         <actions>
8738                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8739                                 <retrieve/>
8740                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8741                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8742                         </actions>
8743                 </permacrud>
8744         </class>
8745
8746         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8747                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8748                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8749                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8750                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8751                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8752                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8753                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8754                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8755                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8756                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8757                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8758                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8759                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8760                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8761                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8762                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8763                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8764                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8765                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8766                 </fields>
8767                 <links>
8768                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8769                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8770             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8771             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8772                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8773                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8774                 </links>
8775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8776             <actions>
8777                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8778                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8779                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8780                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8781             </actions>
8782         </permacrud>
8783         </class>
8784
8785         <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">
8786                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8787                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8788                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8789                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8790                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8791                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8792                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8793                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
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="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8799                 </links>
8800         </class>
8801
8802         <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">
8803                 <fields oils_persist:primary="code">
8804                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8805                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8806                 </fields>
8807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8808             <actions>
8809                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8810                 <retrieve/>
8811                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8812                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8813             </actions>
8814                 </permacrud>
8815         </class>
8816
8817         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8818                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8819                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8820                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8821                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8822                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8823                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8824                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8825                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8826                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8827                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8828                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8829                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8830                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
8831                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
8832                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8833                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8834                 </fields>
8835                 <links>
8836                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8837                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8838                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8839                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8840                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8841                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8842                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8843                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
8844                 </links>
8845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8846             <actions>
8847                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8848                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8849                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8850                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8851             </actions>
8852         </permacrud>
8853         </class>
8854
8855         <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">
8856                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8857                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8858                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8859                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8860                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8861                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8862                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8863                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8864                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8865                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8866                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8867                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8868                 </fields>
8869                 <links>
8870                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8871                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8872                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8873                 </links>
8874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8875             <actions>
8876                 <create   permission="ADMIN_INVOICE">
8877                                         <context link="invoice" field="receiver"/>
8878                                 </create>
8879                 <retrieve permission="ADMIN_INVOICE">
8880                                         <context link="invoice" field="receiver"/>
8881                                 </retrieve>
8882                 <update   permission="ADMIN_INVOICE">
8883                                         <context link="invoice" field="receiver"/>
8884                                 </update>
8885                                 <delete   permission="ADMIN_INVOICE">
8886                                         <context link="invoice" field="receiver"/>
8887                                 </delete>
8888             </actions>
8889         </permacrud>
8890         </class>
8891
8892         <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">
8893                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8894                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8895                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8896                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8897                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8898                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8899                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8900                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8901                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8902                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8903                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8904                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8905                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8906                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8907                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8908                 </fields>
8909                 <links>
8910                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8911                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8912                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8913                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8914                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8915                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8916                 </links>
8917         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8918             <actions>
8919                 <create   permission="ADMIN_INVOICE">
8920                                         <context link="invoice" field="receiver"/>
8921                                 </create>
8922                 <retrieve permission="ADMIN_INVOICE">
8923                                         <context link="invoice" field="receiver"/>
8924                                 </retrieve>
8925                 <update   permission="ADMIN_INVOICE">
8926                                         <context link="invoice" field="receiver"/>
8927                                 </update>
8928                                 <delete   permission="ADMIN_INVOICE">
8929                                         <context link="invoice" field="receiver"/>
8930                                 </delete>
8931             </actions>
8932         </permacrud>
8933         </class>
8934
8935         <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">
8936                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8937                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8938                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8939                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8940                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8941                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8942                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8943                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8944                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8945                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8946                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8947                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8948                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8949                 </fields>
8950                 <links>
8951                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8952                 </links>
8953         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8954             <actions>
8955                 <create permission="ADMIN_PROVIDER">
8956                     <context link="provider" field="owner"/>
8957                 </create>
8958                 <retrieve permission="ADMIN_PROVIDER">
8959                     <context link="provider" field="owner"/>
8960                 </retrieve>
8961                 <update permission="ADMIN_PROVIDER">
8962                     <context link="provider" field="owner"/>
8963                 </update>
8964                 <delete permission="ADMIN_PROVIDER">
8965                     <context link="provider" field="owner"/>
8966                 </delete>
8967             </actions>
8968         </permacrud>
8969         </class>
8970
8971         <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">
8972                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8973                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8974                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8975                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8976                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8977                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8978                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8979         </fields>
8980                 <links>
8981                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8982                 </links>
8983         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8984             <actions>
8985                 <create permission="ADMIN_PROVIDER">
8986                     <context link="provider" field="owner"/>
8987                 </create>
8988                 <retrieve permission="ADMIN_PROVIDER">
8989                     <context link="provider" field="owner"/>
8990                 </retrieve>
8991                 <update permission="ADMIN_PROVIDER">
8992                     <context link="provider" field="owner"/>
8993                 </update>
8994                 <delete permission="ADMIN_PROVIDER">
8995                     <context link="provider" field="owner"/>
8996                 </delete>
8997             </actions>
8998         </permacrud>
8999     </class>
9000         <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">
9001                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
9002                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
9003                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
9004                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
9005                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9006                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
9007                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9008                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
9009                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
9010                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
9011                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
9012                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
9013                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9014                 </fields>
9015                 <links>
9016                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9017                 </links>
9018         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9019             <actions>
9020                 <create permission="ADMIN_PROVIDER">
9021                     <context link="contact" jump='provider' field="owner"/>
9022                 </create>
9023                 <retrieve permission="ADMIN_PROVIDER">
9024                     <context link="contact" jump='provider' field="owner"/>
9025                 </retrieve>
9026                 <update permission="ADMIN_PROVIDER">
9027                     <context link="contact" jump='provider' field="owner"/>
9028                 </update>
9029                 <delete permission="ADMIN_PROVIDER">
9030                     <context link="contact" jump='provider' field="owner"/>
9031                 </delete>
9032             </actions>
9033         </permacrud>
9034         </class>
9035
9036         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
9037                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9038                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9039                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9040                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9041                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9042                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9043                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9044                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9045                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9046                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9047                 </fields>
9048                 <links>
9049                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9050                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9051                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9052                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9053                 </links>
9054         </class>
9055
9056         <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">
9057                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9058                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9059                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9060                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9061                 </fields>
9062                 <links>
9063             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9064                 </links>
9065                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9066                         <actions>
9067                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9068                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9069                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9070                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9071                         </actions>
9072                 </permacrud>
9073         </class>
9074
9075         <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">
9076                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9077                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9078                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9079                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9080                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9081                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9082                 </fields>
9083                 <links>
9084                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9085                 </links>
9086                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9087                         <actions>
9088                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9089                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9090                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9091                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9092                         </actions>
9093                 </permacrud>
9094         </class>
9095
9096         <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">
9097                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9098                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9099                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9100                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
9101                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
9102                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9103                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9104                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9105                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9106                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9107                 </fields>
9108                 <links>
9109                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9110                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9111             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9112             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9113                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9114                 </links>
9115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9116             <actions>
9117                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9118                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9119                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9120                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9121             </actions>
9122         </permacrud>
9123         </class>
9124
9125         <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">
9126                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9127                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9128                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
9129                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9130                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9131                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9132                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9133                 </fields>
9134                 <links>
9135                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9136                 </links>
9137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9138                         <actions>
9139                                 <create permission="ADMIN_FUNDING_SOURCE">
9140                     <context link="funding_source" field="owner"/>
9141                 </create>
9142                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9143                     <context link="funding_source" field="owner"/>
9144                 </retrieve>
9145                                 <update permission="ADMIN_FUNDING_SOURCE">
9146                     <context link="funding_source" field="owner"/>
9147                 </update>
9148                                 <delete permission="ADMIN_FUNDING_SOURCE">
9149                     <context link="funding_source" field="owner"/>
9150                 </delete>
9151                         </actions>
9152                 </permacrud>
9153         </class>
9154
9155         <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">
9156                 <fields oils_persist:primary="id">
9157                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9158                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9159                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9160                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9161                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9162                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9163                 </fields>
9164                 <links>
9165                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9166                 </links>
9167         </class>
9168
9169         <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">
9170                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9171                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9172                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9173                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9174                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9175                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9176                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9177                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9178                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9179                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9180                 </fields>
9181                 <links>
9182                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9183                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9184                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9185                 </links>
9186                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9187                         <actions>
9188                                 <create permission="ADMIN_ACQ_FUND">
9189                     <context link="fund" field="org"/>
9190                 </create>
9191                                 <retrieve permission="ADMIN_ACQ_FUND">
9192                     <context link="fund" field="org"/>
9193                 </retrieve>
9194                                 <update permission="ADMIN_ACQ_FUND">
9195                     <context link="fund" field="org"/>
9196                 </update>
9197                                 <delete permission="ADMIN_ACQ_FUND">
9198                     <context link="fund" field="org"/>
9199                 </delete>
9200                         </actions>
9201                 </permacrud>
9202         </class>
9203
9204         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9205                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9206                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9207                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9208                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9209                         <field reporter:label="Year" name="year" reporter:datatype="int" />
9210                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9211                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9212                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9213                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9214                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9215                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9216                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9217                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9218                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9219                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9220                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9221                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9222                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9223                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9224                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9225                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9226                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9227                 </fields>
9228                 <links>
9229                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9230                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9231             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9232             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9233             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9234             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9235             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9236             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9237             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9238             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9239             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9240                 </links>
9241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9242             <actions>
9243                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9244                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9245                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9246                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9247             </actions>
9248         </permacrud>
9249         </class>
9250
9251         <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">
9252                 <fields oils_persist:primary="fund">
9253                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9254                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9255                 </fields>
9256                 <links>
9257                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9258                 </links>
9259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9260             <actions>
9261                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9262                                         <context link="fund" field="org" />
9263                 </retrieve>
9264             </actions>
9265         </permacrud>
9266         </class>
9267
9268         <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">
9269                 <fields oils_persist:primary="fund">
9270                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9271                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9272                 </fields>
9273                 <links>
9274                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9275                 </links>
9276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9277             <actions>
9278                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9279                                         <context link="fund" field="org" />
9280                 </retrieve>
9281             </actions>
9282         </permacrud>
9283         </class>
9284
9285         <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">
9286                 <fields oils_persist:primary="fund">
9287                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9288                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9289                 </fields>
9290                 <links>
9291                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9292                 </links>
9293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9294             <actions>
9295                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9296                                         <context link="fund" field="org" />
9297                 </retrieve>
9298             </actions>
9299         </permacrud>
9300         </class>
9301
9302         <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">
9303                 <fields oils_persist:primary="fund">
9304                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9305                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9306                 </fields>
9307                 <links>
9308                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9309                 </links>
9310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9311             <actions>
9312                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9313                                         <context link="fund" field="org" />
9314                 </retrieve>
9315             </actions>
9316         </permacrud>
9317         </class>
9318
9319         <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">
9320                 <fields oils_persist:primary="fund">
9321                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9322                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9323                 </fields>
9324                 <links>
9325                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9326                 </links>
9327         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9328             <actions>
9329                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9330                                         <context link="fund" field="org" />
9331                 </retrieve>
9332             </actions>
9333         </permacrud>
9334         </class>
9335
9336    <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">
9337         <fields oils_persist:primary="fund">
9338             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9339             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9340         </fields>
9341         <links>
9342             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9343         </links>
9344     </class>
9345
9346    <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">
9347         <fields oils_persist:primary="fund">
9348             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9349             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9350         </fields>
9351         <links>
9352             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9353         </links>
9354     </class>
9355
9356    <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">
9357         <fields oils_persist:primary="fund">
9358             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9359             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9360         </fields>
9361         <links>
9362             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9363         </links>
9364     </class>
9365
9366    <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">
9367         <fields oils_persist:primary="fund">
9368             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9369             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9370         </fields>
9371         <links>
9372             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9373         </links>
9374     </class>
9375
9376    <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">
9377         <fields oils_persist:primary="fund">
9378             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9379             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9380         </fields>
9381         <links>
9382             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9383         </links>
9384     </class>
9385
9386         <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">
9387                 <fields oils_persist:primary="funding_source">
9388                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9389                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9390                 </fields>
9391                 <links>
9392                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9393                 </links>
9394         </class>
9395
9396         <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">
9397                 <fields oils_persist:primary="funding_source">
9398                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9399                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9400                 </fields>
9401                 <links>
9402                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9403                 </links>
9404         </class>
9405
9406         <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">
9407                 <fields oils_persist:primary="funding_source">
9408                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9409                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9410                 </fields>
9411                 <links>
9412                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9413                 </links>
9414         </class>
9415
9416         <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">
9417                 <fields oils_persist:primary="fund">
9418                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9419                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9420                 </fields>
9421                 <links>
9422                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9423                 </links>
9424         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9425             <actions>
9426                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9427                                         <context link="fund" field="org" />
9428                 </retrieve>
9429             </actions>
9430         </permacrud>
9431     </class>
9432     <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">
9433         <oils_persist:source_definition><![CDATA[
9434             SELECT
9435                 acqf.*,
9436                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9437                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9438                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9439                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9440             FROM
9441                 acq.fund acqf
9442                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9443                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9444                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9445                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9446         ]]></oils_persist:source_definition>
9447         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9448             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9449             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9450             <field reporter:label="Name" name="name" reporter:datatype="text" />
9451             <field reporter:label="Year" name="year" reporter:datatype="int" />
9452             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9453             <field reporter:label="Code" name="code" reporter:datatype="text" />
9454             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9455             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9456             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9457             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9458             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9459
9460             <!-- non fund-native fields -->
9461             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9462             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9463             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9464             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9465         </fields>
9466         <links>
9467             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9468             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9469             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9470         </links>
9471         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9472             <actions>
9473                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9474             </actions>
9475         </permacrud>
9476         </class>
9477         <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">
9478                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9479                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9480                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9481                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9482                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9483                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9484                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9485                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9486                 </fields>
9487                 <links>
9488                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9489                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9490                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9491                 </links>
9492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9493                         <actions>
9494                                 <create permission="ADMIN_ACQ_FUND">
9495                     <context link="fund" field="org"/>
9496                 </create>
9497                                 <retrieve permission="ADMIN_ACQ_FUND">
9498                     <context link="fund" field="org"/>
9499                 </retrieve>
9500                                 <update permission="ADMIN_ACQ_FUND">
9501                     <context link="fund" field="org"/>
9502                 </update>
9503                                 <delete permission="ADMIN_ACQ_FUND">
9504                     <context link="fund" field="org"/>
9505                 </delete>
9506                         </actions>
9507                 </permacrud>
9508         </class>
9509
9510     <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">
9511         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9512             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9513             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9514             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9515             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9516             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9517             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9518             <field reporter:label="Note" name="note" reporter:datatype="text" />
9519             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9520         </fields>
9521         <links>
9522             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9523             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9524             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9525         </links>
9526                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9527                         <actions>
9528                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9529                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9530                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9531                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9532                         </actions>
9533                 </permacrud>
9534     </class>
9535
9536         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9537                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9538                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9539                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9540                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9541                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9542                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9543                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9544                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9545                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9546                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9547                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9548                 </fields>
9549                 <links>
9550                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9551                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9552                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9553                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9554                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9555                 </links>
9556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9557                         <actions>
9558                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9559                         </actions>
9560                 </permacrud>
9561         </class>
9562
9563         <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">
9564                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9565                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9566                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9567                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9568                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9569                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9570                 </fields>
9571                 <links>
9572                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9573                 </links>
9574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9575                         <actions>
9576                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9577                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9578                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9579                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9580                         </actions>
9581                 </permacrud>
9582         </class>
9583
9584         <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">
9585                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9586                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9587                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9588                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9589                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9590                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9591                         <field reporter:label="State" name="state" reporter:datatype="text" />
9592                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9593                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9594                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9595                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9596                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9597                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9598                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9599                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9600                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9601                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9602                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9603                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9604                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9605                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9606                 </fields>
9607                 <links>
9608                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9609                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9610                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9611                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9612                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9613                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9614                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9615                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9616                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9617                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9618                 </links>
9619                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9620                         <actions>
9621                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9622                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9623                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9624                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9625                         </actions>
9626                 </permacrud>
9627         </class>
9628
9629         <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">
9630                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9631                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9632                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9633                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9634                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9635                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9636                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9637                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9638                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9639                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9640                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9641                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9642                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9643                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9644                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9645                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9646                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9647                 </fields>
9648                 <links>
9649                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9650                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9651                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9652                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9653                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9654                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9655                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9656                 </links>
9657                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9658             <actions>
9659                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9660             </actions>
9661                 </permacrud>
9662         </class>
9663
9664         <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">
9665                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9666                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9667                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9668                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9669                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9670                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9671                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9672                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9673                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9674                 </fields>
9675                 <links>
9676                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9677                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9678                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9679                 </links>
9680                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9681             <actions>
9682                 <create permission="CREATE_PURCHASE_ORDER">
9683                     <context link="purchase_order" field="ordering_agency"/>
9684                 </create>
9685                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9686                     <context link="purchase_order" field="ordering_agency"/>
9687                 </retrieve>
9688                 <update permission="CREATE_PURCHASE_ORDER">
9689                     <context link="purchase_order" field="ordering_agency"/>
9690                 </update>
9691                 <delete permission="CREATE_PURCHASE_ORDER">
9692                     <context link="purchase_order" field="ordering_agency"/>
9693                 </delete>
9694             </actions>
9695                 </permacrud>
9696         </class>
9697
9698         <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">
9699                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9700                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9701                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9702                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9703                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9704                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9705                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9706                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9707                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9708                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9709                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9710                 </fields>
9711                 <links>
9712                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9713                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9714                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9715                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9716                 </links>
9717                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9718             <actions>
9719                 <create permission="CREATE_PURCHASE_ORDER">
9720                     <context link="purchase_order" field="ordering_agency"/>
9721                 </create>
9722                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9723                     <context link="purchase_order" field="ordering_agency"/>
9724                 </retrieve>
9725                 <update permission="CREATE_PURCHASE_ORDER">
9726                     <context link="purchase_order" field="ordering_agency"/>
9727                 </update>
9728                 <delete permission="CREATE_PURCHASE_ORDER">
9729                     <context link="purchase_order" field="ordering_agency"/>
9730                 </delete>
9731             </actions>
9732                 </permacrud>
9733         </class>
9734
9735         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9736                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9737                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9738                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9739                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9740                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9741                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9742                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9743                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9744                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9745                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9746                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9747                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9748                         <field reporter:label="State" name="state" reporter:datatype="text" />
9749                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9750                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9751                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9752                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9753                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9754                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9755                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9756                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9757                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9758                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9759                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9760                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9761                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9762                 </fields>
9763                 <links>
9764                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9765                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9766                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9767                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9768                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9769                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9770                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9771                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9772                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9773                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9774                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9775                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9776                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9777                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9778                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9779                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9780                 </links>
9781                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9782                         <actions>
9783                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9784                                         <context link="purchase_order" field="ordering_agency"/>
9785                                         <context link="picklist" field="org_unit"/>
9786                                 </retrieve>
9787                         </actions>
9788                 </permacrud>
9789         </class>
9790
9791         <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">
9792                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9793                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9794                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9795                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9796                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9797                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9798                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9799                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9800                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9801                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9802                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9803                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9804                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9805                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9806                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9807                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9808                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9809                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9810                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9811                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9812                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9813                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9814                 </fields>
9815                 <links>
9816                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9817                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9818                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9819                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9820                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9821                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9822                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9823                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9824                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9825                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9826                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9827                 </links>
9828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9829                         <actions>
9830                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9831                                         <context link="purchase_order" field="ordering_agency"/>
9832                                         <context link="picklist" field="org_unit"/>
9833                                 </retrieve>
9834                         </actions>
9835                 </permacrud>
9836         </class>
9837
9838         <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">
9839                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9840                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9841                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9842                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9843                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9844                 </fields>
9845                 <links>
9846                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9847                 </links>
9848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9849                         <actions>
9850                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9851                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9852                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9853                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9854                         </actions>
9855                 </permacrud>
9856         </class>
9857
9858         <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">
9859                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9860                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9861                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9862                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9863                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9864                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9865                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9866                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9867                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9868                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9869                 </fields>
9870                 <links>
9871                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9872                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9873                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9874                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9875                 </links>
9876         </class>
9877
9878         <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">
9879                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9880                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9881                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9882                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9883                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9884                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9885                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9886                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9887                 </fields>
9888                 <links>
9889                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9890                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9891                 </links>
9892         </class>
9893
9894         <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">
9895                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9896                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9897                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9898                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9899                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9900                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9901                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9902                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9903                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9904                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9905                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9906                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9907                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9908                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9909                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9910                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9911                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9912                 </fields>
9913                 <links>
9914                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9915                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9916                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9917                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9918                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9919                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9920                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9921                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9922                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9923                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9924                 </links>
9925         </class>
9926
9927         <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">
9928                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9929                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9930                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9931                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9932                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9933                 </fields>
9934                 <links/>
9935                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9936                         <actions>
9937                                 <retrieve />
9938                         </actions>
9939                 </permacrud>
9940         </class>
9941
9942         <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">
9943                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9944                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9945                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9946                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9947                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9948                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9949             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9950                 </fields>
9951                 <links/>
9952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9953             <actions>
9954                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9955                 <retrieve />
9956                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9957                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9958             </actions>
9959         </permacrud>
9960         </class>
9961
9962         <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">
9963                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9964                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9965                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9966                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9967                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9968                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9969                 </fields>
9970                 <links/>
9971         </class>
9972         <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">
9973                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9974                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9975                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9976                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9977                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9978                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9979                 </fields>
9980                 <links>
9981                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9982                 </links>
9983         </class>
9984
9985         <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">
9986             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9987                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9988                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9989                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9990                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9991                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9992                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9993         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9994
9995             </fields>
9996             <links>
9997                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9998             </links>
9999             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10000                 <actions>
10001                     <create permission="ADMIN_PROVIDER">
10002                         <context link="provider" field="owner"/>
10003                     </create>
10004                     <retrieve permission="ADMIN_PROVIDER">
10005                         <context link="provider" field="owner"/>
10006                     </retrieve>
10007                     <update permission="ADMIN_PROVIDER">
10008                         <context link="provider" field="owner"/>
10009                     </update>
10010                     <delete permission="ADMIN_PROVIDER">
10011                         <context link="provider" field="owner"/>
10012                     </delete>
10013                 </actions>
10014             </permacrud>
10015         </class>
10016         
10017         <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">
10018             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10019                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10020                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10021                 <field reporter:label="Name" name="name" reporter:datatype="text" />
10022                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
10023             </fields>
10024             <links>
10025                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10026             </links>
10027             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10028                 <actions>
10029                     <create permission="ADMIN_PROVIDER">
10030                         <context link="provider" field="owner"/>
10031                     </create>
10032                     <retrieve permission="ADMIN_PROVIDER">
10033                         <context link="provider" field="owner"/>
10034                     </retrieve>
10035                     <update permission="ADMIN_PROVIDER">
10036                         <context link="provider" field="owner"/>
10037                     </update>
10038                     <delete permission="ADMIN_PROVIDER">
10039                         <context link="provider" field="owner"/>
10040                     </delete>
10041                 </actions>
10042             </permacrud>
10043         </class>
10044         
10045         <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">
10046             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10047                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10048                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10049                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10050                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10051                 </fields>
10052                 <links/>
10053         </class>
10054
10055         <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">
10056                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10057                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10058                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
10059                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
10060                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10061                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10062                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10063                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10064                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
10065                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10066                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
10067                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10068                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10069                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10070                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10071                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
10072                 </fields>
10073                 <links>
10074                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10075                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10076                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10077                 </links>
10078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10079             <actions>
10080                 <create permission="ADMIN_PROVIDER">
10081                     <context link="provider" field="owner"/>
10082                 </create>
10083                 <retrieve permission="ADMIN_PROVIDER">
10084                     <context link="provider" field="owner"/>
10085                 </retrieve>
10086                 <update permission="ADMIN_PROVIDER">
10087                     <context link="provider" field="owner"/>
10088                 </update>
10089                 <delete permission="ADMIN_PROVIDER">
10090                     <context link="provider" field="owner"/>
10091                 </delete>
10092             </actions>
10093         </permacrud>
10094         </class>
10095
10096         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10097                 oils_obj:fieldmapper="acq::edi_attr" 
10098                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10099                 <fields oils_persist:primary="key">
10100                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10101                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10102                 </fields>
10103         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10104             <actions>
10105                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10106                 <retrieve/>
10107                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10108                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10109             </actions>
10110         </permacrud>
10111         </class>
10112         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10113                 oils_obj:fieldmapper="acq::edi_attr_set" 
10114                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10115                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10116                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10117                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10118                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10119                 </fields>
10120                 <links>
10121                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10122                 </links>
10123         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10124             <actions>
10125                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10126                 <retrieve/>
10127                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10128                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10129             </actions>
10130         </permacrud>
10131         </class>
10132         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10133                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10134                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10135                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10136                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10137                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10138                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10139                 </fields>
10140                 <links>
10141                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10142                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10143                 </links>
10144         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10145             <actions>
10146                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10147                 <retrieve/>
10148                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10149                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10150             </actions>
10151         </permacrud>
10152         </class>
10153
10154
10155         <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">
10156                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10157                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10158                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10159                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10160                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10161                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10162                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10163                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10164                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10165                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10166                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10167                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10168                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10169                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10170                 </fields>
10171                 <links>
10172                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10173                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10174                 </links>
10175         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10176             <actions>
10177                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10178                     <context link="account" jump="provider" field="owner"/>
10179                 </retrieve>
10180                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10181                     <context link="account" jump="provider" field="owner"/>
10182                 </update>
10183                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10184                     <context link="account" jump="provider" field="owner"/>
10185                 </delete>
10186             </actions>
10187         </permacrud>
10188         </class>
10189
10190
10191         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10192                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10193                         <field name="id" reporter:datatype="id" />
10194                         <field name="parent" reporter:datatype="link"/>
10195                         <field name="owner" reporter:datatype="link"/>
10196                         <field name="create_time" reporter:datatype="timestamp"/>
10197                         <field name="name" reporter:datatype="text"/>
10198                         <field name="shared" reporter:datatype="bool"/>
10199                         <field name="share_with" reporter:datatype="link"/>
10200                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10201                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10202                 </fields>
10203                 <links>
10204                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10205                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10206                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10207                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10208                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10209                 </links>
10210         </class>
10211         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10212                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10213                         <field name="id" reporter:datatype="id" />
10214                         <field name="parent" reporter:datatype="link"/>
10215                         <field name="owner" reporter:datatype="link"/>
10216                         <field name="create_time" reporter:datatype="timestamp"/>
10217                         <field name="name" reporter:datatype="text"/>
10218                         <field name="shared" reporter:datatype="bool"/>
10219                         <field name="share_with" reporter:datatype="link"/>
10220                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10221                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10222                 </fields>
10223                 <links>
10224                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10225                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10226                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10227                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10228                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10229                 </links>
10230         </class>
10231         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10232                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10233                         <field name="id" reporter:datatype="id" />
10234                         <field name="parent" reporter:datatype="link"/>
10235                         <field name="owner" reporter:datatype="link"/>
10236                         <field name="create_time" reporter:datatype="timestamp"/>
10237                         <field name="name" reporter:datatype="text"/>
10238                         <field name="shared" reporter:datatype="bool"/>
10239                         <field name="share_with" reporter:datatype="link"/>
10240                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10241                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10242                 </fields>
10243                 <links>
10244                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10245                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10246                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10247                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10248                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10249                 </links>
10250         </class>
10251         <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">
10252                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10253                         <field name="id" reporter:datatype="id" />
10254                         <field name="owner" reporter:datatype="link"/>
10255                         <field name="create_time" reporter:datatype="timestamp"/>
10256                         <field name="name" reporter:datatype="text"/>
10257                         <field name="data" reporter:datatype="text"/>
10258                         <field name="folder" reporter:datatype="link"/>
10259                         <field name="description" reporter:datatype="text"/>
10260                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10261                 </fields>
10262                 <links>
10263                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10264                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10265                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10266                 </links>
10267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10268             <actions>
10269                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10270                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10271                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10272                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10273             </actions>
10274         </permacrud>
10275         </class>
10276         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10277                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10278                         <field name="id" reporter:datatype="id" />
10279                         <field name="owner" reporter:datatype="link"/>
10280                         <field name="create_time" reporter:datatype="timestamp"/>
10281                         <field name="template" reporter:datatype="link"/>
10282                         <field name="data" reporter:datatype="text"/>
10283                         <field name="folder" reporter:datatype="link"/>
10284                         <field name="recur" reporter:datatype="bool"/>
10285                         <field name="recurrence" reporter:datatype="interval"/>
10286                         <field name="name" reporter:datatype="text"/>
10287                         <field name="description" reporter:datatype="text"/>
10288                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10289                 </fields>
10290                 <links>
10291                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10292                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10293                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10294                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10295                 </links>
10296         </class>
10297         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10298                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10299                         <field name="id" reporter:datatype="id" />
10300                         <field name="runner" reporter:datatype="link"/>
10301                         <field name="start_time" reporter:datatype="timestamp"/>
10302                         <field name="complete_time" reporter:datatype="timestamp"/>
10303                         <field name="run_time" reporter:datatype="timestamp"/>
10304                         <field name="email" reporter:datatype="text"/>
10305                         <field name="excel_format" reporter:datatype="bool"/>
10306                         <field name="csv_format" reporter:datatype="bool"/>
10307                         <field name="html_format" reporter:datatype="bool"/>
10308                         <field name="error_code" reporter:datatype="int"/>
10309                         <field name="error_text" reporter:datatype="text"/>
10310                         <field name="report" reporter:datatype="link"/>
10311                         <field name="folder" reporter:datatype="link"/>
10312                         <field name="chart_pie" reporter:datatype="bool"/>
10313                         <field name="chart_bar" reporter:datatype="bool"/>
10314                         <field name="chart_line" reporter:datatype="bool"/>
10315                 </fields>
10316                 <links>
10317                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10318                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10319                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10320                 </links>
10321         </class>
10322         <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">
10323                 <fields oils_persist:primary="id">
10324                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10325                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10326                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10327                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10328                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10329                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10330                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10331                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10332                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10333                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10334                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10335                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10336                 </fields>
10337                 <links>
10338                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10339                 </links>
10340                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10341                         <actions>
10342                                 <retrieve />
10343                         </actions>
10344                 </permacrud>
10345         </class>
10346         <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">
10347                 <fields oils_persist:primary="id">
10348                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10349                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10350                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10351                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10352                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10353                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10354                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10355                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10356                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10357                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10358                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10359                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10360                 </fields>
10361                 <links>
10362                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10363                 </links>
10364         </class>
10365         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10366                 <fields oils_persist:primary="id">
10367                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10368                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10369                         <field reporter:label="Fingerprint" name="fingerprint" />
10370                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10371                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10372                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10373                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10374                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10375                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10376                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10377                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10378                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10379                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10380                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10381                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10382                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10383                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10384                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10385                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10386                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10387                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10388                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10389                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10390                 </fields>
10391                 <links>
10392                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10393                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10394                 </links>
10395         </class>
10396         <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">
10397                 <fields oils_persist:primary="id">
10398                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10399                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10400                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10401                 </fields>
10402                 <links>
10403                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10404                 </links>
10405         </class>
10406         <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">
10407                 <fields oils_persist:primary="id">
10408                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10409                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10410                 </fields>
10411                 <links>
10412                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10413                 </links>
10414         </class>
10415         <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">
10416                 <fields oils_persist:primary="id">
10417                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10418                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10419                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10420                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10421                 </fields>
10422                 <links>
10423                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10424                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10425                 </links>
10426         </class>
10427         <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">
10428                 <fields oils_persist:primary="xact">
10429                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10430                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
10431                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10432                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10433                 </fields>
10434                 <links>
10435                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10436                 </links>
10437         </class>
10438         <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">
10439                 <fields oils_persist:primary="xact">
10440                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10441                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
10442                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10443                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10444                 </fields>
10445                 <links>
10446                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10447                 </links>
10448         </class>
10449         <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)">
10450                 <fields oils_persist:primary="id">
10451                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10452                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10453                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10454                 </fields>
10455                 <links>
10456                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10457                 </links>
10458         </class>
10459         <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">
10460                 <fields oils_persist:primary="id">
10461                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10462                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10463                 </fields>
10464                 <links>
10465                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10466                 </links>
10467         </class>
10468         <class id="erccpo" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::copy_count_per_org" oils_persist:tablename="extend_reporter.copy_count_per_org" reporter:label="Library Holdings Count with Deleted">
10469                 <fields oils_persist:primary="bibid">
10470                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10471                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10472                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10473                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10474                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10475                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10476                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10477                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10478                 </fields>
10479                 <links>
10480                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10481                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10482                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10483                 </links>
10484         </class>
10485         <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">
10486                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10487                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10488                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10489                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10490                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10491                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10492                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10493                 </fields>
10494                 <links>
10495                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10496                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10497                 </links>
10498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10499                         <actions>
10500                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10501                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10502                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10503                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10504                         </actions>
10505                 </permacrud>
10506         </class>
10507         <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">
10508                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10509                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10510                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10511                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10512                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10513                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10514                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10515                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10516                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10517                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10518                 </fields>
10519                 <links>
10520                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10521                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10522                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10523                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10524                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10525                 </links>
10526                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10527                         <actions>
10528                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10529                                         <context link="formula" field="owner"/>
10530                                 </create>
10531                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10532                                         <context link="formula" field="owner"/>
10533                                 </retrieve>
10534                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10535                                         <context link="formula" field="owner"/>
10536                                 </update>
10537                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10538                                         <context link="formula" field="owner"/>
10539                                 </delete>
10540                         </actions>
10541                 </permacrud>
10542         </class>
10543
10544         <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">
10545                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10546                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10547                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10548                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10549                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10550                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10551                 </fields>
10552                 <links>
10553                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10554                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10555                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10556                 </links>
10557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10558                         <actions>
10559                                 <create permission="CREATE_PURCHASE_ORDER">
10560                                         <context link="formula" field="owner"/>
10561                 </create>
10562                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10563                                         <context link="formula" field="owner"/>
10564                 </retrieve>
10565                                 <update permission="CREATE_PURCHASE_ORDER">
10566                                         <context link="formula" field="owner"/>
10567                 </update>
10568                                 <delete permission="CREATE_PURCHASE_ORDER">
10569                                         <context link="formula" field="owner"/>
10570                 </delete>
10571                         </actions>
10572                 </permacrud>
10573         </class>
10574
10575         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10576                 <fields oils_persist:primary="id">
10577                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10578                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10579                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10580                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10581                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10582                 </fields>
10583                 <links>
10584                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10585                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10586                 </links>
10587         </class>
10588
10589         <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">
10590                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10591                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10592                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10593                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10594                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10595                 </fields>
10596                 <links>
10597                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10598                 </links>
10599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10600                         <actions>
10601                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10602                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10603                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10604                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10605                         </actions>
10606                 </permacrud>
10607         </class>
10608
10609         <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">
10610                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10611                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10612                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10613                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10614                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10615                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10616                 </fields>
10617                 <links>
10618                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10619                 </links>
10620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10621                         <actions>
10622                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10623                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10624                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10625                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10626                         </actions>
10627                 </permacrud>
10628         </class>
10629
10630         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10631                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10632                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10633                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10634                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10635                 </fields>
10636                 <links>
10637                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10638                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10639                 </links>
10640         </class>
10641
10642         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10643                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10644                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10645                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10646                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10647                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10648                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10649                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10650                 </fields>
10651                 <links>
10652                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10653                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10654                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10655                 </links>
10656         </class>
10657
10658         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10659                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10660                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10661                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10662                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10663                 </fields>
10664                 <links>
10665                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10666                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10667                 </links>
10668         </class>
10669
10670         <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">
10671                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10672                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10673                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10674                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10675                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10676                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10677                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10678                 </fields>
10679                 <links>
10680                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10681                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10682                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10683                 </links>
10684         </class>
10685
10686         <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">
10687                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10688                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10689                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10690                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10691                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10692                 </fields>
10693                 <links>
10694                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10695                 </links>
10696                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10697             <actions>
10698                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10699                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10700                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10701                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10702             </actions>
10703                 </permacrud>
10704         </class>
10705
10706         <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">
10707                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10708                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10709                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10710                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10711                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10712                 </fields>
10713                 <links>
10714                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10715                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10716                 </links>
10717                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10718                         <actions>
10719                                 <create permission="ADMIN_CLAIM_POLICY">
10720                                         <context link="claim_policy" field="org_unit"/>
10721                 </create>
10722                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10723                                         <context link="claim_policy" field="org_unit"/>
10724                 </retrieve>
10725                                 <update permission="ADMIN_CLAIM_POLICY">
10726                                         <context link="claim_policy" field="org_unit"/>
10727                 </update>
10728                                 <delete permission="ADMIN_CLAIM_POLICY">
10729                                         <context link="claim_policy" field="org_unit"/>
10730                 </delete>
10731                         </actions>
10732                 </permacrud>
10733         </class>
10734
10735     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10736         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10737             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10738             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10739             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10740             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10741             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10742             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10743             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10744             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10745             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10746             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10747             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10748             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10749             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10750             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10751             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10752             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10753                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
10754                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
10755                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
10756         </fields>
10757         <links>
10758             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10759         </links>
10760     </class>
10761
10762     <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">
10763         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10764             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10765             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10766             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10767             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10768             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10769         </fields>
10770     </class>
10771
10772     <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">
10773         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10774             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10775             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10776             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10777             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10778             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10779             <field reporter:label="City" name="city" reporter:datatype="text"/>
10780             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10781             <field reporter:label="State" name="state" reporter:datatype="text"/>
10782             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10783             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10784             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10785         </fields>
10786     </class>
10787
10788     <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">
10789         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10790             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10791             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10792             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10793             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10794             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10795             <field reporter:label="City" name="city" reporter:datatype="text"/>
10796             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10797             <field reporter:label="State" name="state" reporter:datatype="text"/>
10798             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10799             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10800             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10801         </fields>
10802     </class>
10803
10804     <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">
10805         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10806             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10807             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10808             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10809             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10810             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10811             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10812         </fields>
10813     </class>
10814
10815     <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">
10816         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10817             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10818             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10819             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10820             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10821             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10822             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10823         </fields>
10824     </class>
10825
10826         <class id="afsg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_group" oils_persist:tablename="action.fieldset_group" reporter:label="Fieldset Group">
10827                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10828                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10829                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10830                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10831                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10832                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10833                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10834                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10835                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10836                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10837                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10838                 </fields>
10839                 <links>
10840                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10841                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10842                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10843                 </links>
10844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10845                         <actions>
10846                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10847                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10848                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10849                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10850                         </actions>
10851                 </permacrud>
10852         </class>
10853
10854         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10855                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10856                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10857                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10858                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10859                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10860                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10861                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10862                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10863                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10864                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10865                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10866                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10867                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10868                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10869                 </fields>
10870                 <links>
10871                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10872                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10873                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10874                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10875                 </links>
10876                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10877                         <actions>
10878                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10879                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10880                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10881                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10882                         </actions>
10883                 </permacrud>
10884         </class>
10885
10886         <class id="afscv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
10887                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10888                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10889                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10890                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10891                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10892                 </fields>
10893                 <links>
10894                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10895                 </links>
10896                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10897                         <actions>
10898                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10899                     <context link="fieldset" field="owning_lib"/>
10900                 </create>
10901                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10902                     <context link="fieldset" field="owning_lib"/>
10903                 </retrieve>
10904                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10905                     <context link="fieldset" field="owning_lib"/>
10906                 </update>
10907                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10908                     <context link="fieldset" field="owning_lib"/>
10909                 </delete>
10910                         </actions>
10911                 </permacrud>
10912         </class>
10913
10914     <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">
10915         <fields>
10916             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10917             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10918             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10919         </fields>
10920                 <links>
10921                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10922                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10923                 </links>
10924     </class>
10925
10926     <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">
10927         <fields>
10928             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10929             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10930         </fields>
10931                 <links>
10932                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10933                 </links>
10934     </class>
10935
10936     <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">
10937         <fields>
10938             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10939             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10940             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10941         </fields>
10942                 <links>
10943                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10944                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10945                 </links>
10946     </class>
10947
10948     <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">
10949         <fields>
10950             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10951             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10952         </fields>
10953                 <links>
10954                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10955                 </links>
10956     </class>
10957
10958     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10959                 <oils_persist:source_definition><![CDATA[
10960
10961             SELECT  DISTINCT l.*
10962               FROM  action.unfulfilled_hold_loops l
10963                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10964               WHERE l.count = m.max
10965
10966                 ]]></oils_persist:source_definition>
10967         <fields>
10968             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10969             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10970             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10971         </fields>
10972                 <links>
10973                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10974                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10975                 </links>
10976     </class>
10977
10978         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10979                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10980                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10981                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10982                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10983                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10984                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10985                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10986                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10987                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10988                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10989                 </fields>
10990                 <links>
10991                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10992                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10993                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10994                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10995                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10996                 </links>
10997         </class>
10998
10999         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
11000                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
11001                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
11002                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
11003                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11004                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
11005                 </fields>
11006                 <links>
11007                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
11008                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
11009                 </links>
11010         </class>
11011
11012         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
11013                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11014                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11015                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11016                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11017                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11018                 </fields>
11019                 <links>
11020                 </links>
11021         </class>
11022
11023         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11024                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11025                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11026                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11027                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11028                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11029                 </fields>
11030                 <links>
11031                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11032                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11033                 </links>
11034         </class>
11035         
11036         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11037                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11038                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11039                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11040                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11041                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11042                 </fields>
11043                 <links>
11044                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11045                 </links>
11046         </class>
11047         
11048         <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">
11049                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11050                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11051                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11052                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11053                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11054                 </fields>
11055                 <links>
11056                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11057                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11058                 </links>
11059         </class>
11060
11061         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11062                 <fields oils_persist:primary="name">
11063                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11064                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11065                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11066                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11067                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11068                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11069                 </fields>
11070                 <links>
11071                 </links>
11072         </class>
11073
11074         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11075                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11076                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11077                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11078                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11079                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11080                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11081                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11082                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11083                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11084                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11085                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11086                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11087                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11088                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11089                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11090                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11091                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11092                 </fields>
11093                 <links>
11094                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11095                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11096                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11097                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11098                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11099                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11100                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11101                 </links>
11102         </class>
11103
11104         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11105                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11106                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11107                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11108                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11109                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11110                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11111                 </fields>
11112                 <links>
11113                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11114                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11115                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11116                 </links>
11117         </class>
11118
11119         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11120                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11121                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11122                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11123                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11124                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11125                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11126                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11127                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11128                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11129                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11130                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11131                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11132                 </fields>
11133                 <links>
11134                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11135                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11136                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11137                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11138                 </links>
11139         </class>
11140
11141         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11142                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11143                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11144                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11145                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11146                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11147                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11148                 </fields>
11149                 <links>
11150                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11151                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11152                 </links>
11153         </class>
11154
11155         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11156                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11157                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11158                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11159                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11160                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11161                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11162                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11163                 </fields>
11164                 <links>
11165                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11166                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11167                 </links>
11168         </class>
11169
11170         <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">
11171                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11172                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11173                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11174                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11175                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11176                 </fields>
11177                 <links>
11178                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11179                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11180                 </links>
11181         </class>
11182
11183         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11184                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11185                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11186                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11187                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11188                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11189                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11190                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11191                 </fields>
11192                 <links>
11193                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11194                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11195                 </links>
11196         </class>
11197
11198         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11199                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11200                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11201                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11202                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11203                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11204                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11205                 </fields>
11206                 <links>
11207                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11208                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11209                 </links>
11210         </class>
11211
11212         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11213                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11214                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11215                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11216                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11217                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11218                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11219                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11220                 </fields>
11221                 <links>
11222                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11223                 </links>
11224         </class>
11225
11226         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11227                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11228                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11229                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11230                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11231                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11232                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11233                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11234                 </fields>
11235                 <links>
11236                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11237                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11238                 </links>
11239         </class>
11240
11241         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11242                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11243                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11244                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11245                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11246                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11247                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11248                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11249                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11250                 </fields>
11251                 <links>
11252                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11253                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11254                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11255                 </links>
11256         </class>
11257
11258         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11259                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11260                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11261                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11262                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11263                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11264                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11265                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11266                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11267                 </fields>
11268                 <links>
11269                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11270                 </links>
11271         </class>
11272
11273         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11274                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11275                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11276                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11277                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11278                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11279                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11280                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11281                 </fields>
11282                 <links>
11283                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11284                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11285                 </links>
11286         </class>
11287
11288         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11289                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11290                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11291                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11292                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11293                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11294                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11295                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11296                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11297                 </fields>
11298                 <links>
11299                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11300                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11301                 </links>
11302         </class>
11303
11304         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11305                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11306                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11307                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11308                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11309                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11310                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11311                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11312                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11313                 </fields>
11314                 <links>
11315                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11316                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11317                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11318                 </links>
11319         </class>
11320
11321         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11322                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11323                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11324                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11325                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11326                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11327                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11328                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11329                 </fields>
11330                 <links>
11331                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11332                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11333                 </links>
11334         </class>
11335
11336         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11337                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11338                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11339                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11340                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11341                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11342                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11343                 </fields>
11344                 <links>
11345                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11346                 </links>
11347         </class>
11348
11349         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11350                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11351                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11352                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11353                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11354                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11355                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11356                 </fields>
11357                 <links>
11358                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11359                 </links>
11360         </class>
11361
11362         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11363                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11364                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11365                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11366                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11367                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11368                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11369                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11370                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11371                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11372                 </fields>
11373                 <links>
11374                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11375                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11376                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11377                 </links>
11378         </class>
11379
11380         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11381                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11382                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11383                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11384                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11385                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11386                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11387                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11388                 </fields>
11389                 <links>
11390                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11391                 </links>
11392         </class>
11393
11394         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11395                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11396                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11397                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11398                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11399                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11400                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11401                 </fields>
11402                 <links>
11403                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11404                 </links>
11405         </class>
11406
11407         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11408                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11409                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11410                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11411                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11412                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11413                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11414                 </fields>
11415                 <links>
11416                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11417                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11418                 </links>
11419         </class>
11420
11421         <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">
11422                 <fields oils_persist:primary="id">
11423                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11424                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11425                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11426                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11427                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11428                 </fields>
11429                 <links>
11430                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11431                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11432                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11433                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11434                 </links>
11435         </class>
11436
11437         <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">
11438                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11439                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11440                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11441                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11442                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11443                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11444                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11445                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11446                 </fields>
11447                 <links/>
11448                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11449                         <actions>
11450                                 <retrieve/>
11451                         </actions>
11452                 </permacrud>
11453         </class>
11454
11455         <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">
11456                 <fields oils_persist:primary="ptype_key">
11457                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11458                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11459                 </fields>
11460                 <links/>
11461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11462                         <actions>
11463                                 <retrieve/>
11464                         </actions>
11465                 </permacrud>
11466         </class>
11467
11468         <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">
11469                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11470                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11471                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11472                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11473                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11474                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11475                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11476                 </fields>
11477                 <links>
11478                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11479                 </links>
11480                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11481                         <actions>
11482                                 <retrieve/>
11483                         </actions>
11484                 </permacrud>
11485         </class>
11486
11487         <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">
11488                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11489                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11490                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11491                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11492                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11493                 </fields>
11494                 <links>
11495                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11496                 </links>
11497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11498                         <actions>
11499                                 <retrieve/>
11500                         </actions>
11501                 </permacrud>
11502         </class>
11503
11504     <class
11505         id="uvs"
11506         controller="open-ils.cstore open-ils.pcrud"
11507         oils_obj:fieldmapper="url_verify::session"
11508         oils_persist:tablename="url_verify.session"
11509         reporter:label="URL Verification Session"
11510     >
11511         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11512             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11513             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11514                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11515             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11516             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11517             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11518             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11519             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11520             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11521         </fields>
11522
11523         <links>
11524             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11525             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11526             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11527             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11528             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11529         </links>
11530
11531         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11532             <actions>
11533                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11534             </actions>
11535         </permacrud>
11536
11537     </class>
11538
11539     <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">
11540         <oils_persist:source_definition><![CDATA[
11541             SELECT
11542                 cbrebi.id AS id,  -- so we can have a pkey in our view
11543                 uvs.id AS session,
11544                 uvs.owning_lib,
11545                 cbrebi.target_biblio_record_entry
11546             FROM url_verify.session uvs
11547             JOIN container.biblio_record_entry_bucket cbreb
11548                 ON (uvs.container = cbreb.id)
11549             JOIN container.biblio_record_entry_bucket_item cbrebi
11550                 ON (cbrebi.bucket = cbreb.id)
11551         ]]></oils_persist:source_definition>
11552         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11553             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11554             <field reporter:label="Session" name="session" reporter:datatype="link" />
11555             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11556             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11557         </fields>
11558         <links>
11559             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11560             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11561             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11562         </links>
11563         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11564             <actions>
11565                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11566             </actions>
11567         </permacrud>
11568     </class>
11569
11570     <class
11571         id="uvus"
11572         controller="open-ils.cstore open-ils.pcrud"
11573         oils_obj:fieldmapper="url_verify::url_selector"
11574         oils_persist:tablename="url_verify.url_selector"
11575         reporter:label="URL Verification URL Selector"
11576     >
11577         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11578             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11579             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11580                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11581             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11582         </fields>
11583
11584         <links>
11585             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11586             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11587         </links>
11588
11589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11590             <actions>
11591                 <create permission="URL_VERIFY">
11592                     <context link="session" field="owning_lib"/>
11593                 </create>
11594                 <retrieve permission="URL_VERIFY">
11595                     <context link="session" field="owning_lib"/>
11596                 </retrieve>
11597                 <update permission="URL_VERIFY">
11598                     <context link="session" field="owning_lib"/>
11599                 </update>
11600                 <delete permission="URL_VERIFY">
11601                     <context link="session" field="owning_lib"/>
11602                 </delete>
11603             </actions>
11604         </permacrud>
11605
11606     </class>
11607
11608     <class
11609         id="uvu"
11610         controller="open-ils.cstore open-ils.pcrud"
11611         oils_obj:fieldmapper="url_verify::url"
11612         oils_persist:tablename="url_verify.url"
11613         reporter:label="URL Verification URL"
11614     >
11615         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11616             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11617                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11618                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11619                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11620                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11621             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11622             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11623             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11624             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11625             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11626             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11627             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11628             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11629             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11630             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11631             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11632             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11633             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11634         </fields>
11635
11636         <links>
11637             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11638             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11639             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11640             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11641             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11642         </links>
11643
11644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11645             <actions>
11646                 <create permission="URL_VERIFY">
11647                     <context link="session" field="owning_lib"/>
11648                 </create>
11649                 <retrieve permission="URL_VERIFY">
11650                     <context link="session" field="owning_lib"/>
11651                 </retrieve>
11652                 <update permission="URL_VERIFY">
11653                     <context link="session" field="owning_lib"/>
11654                 </update>
11655                 <delete permission="URL_VERIFY">
11656                     <context link="session" field="owning_lib"/>
11657                 </delete>
11658             </actions>
11659         </permacrud>
11660
11661     </class>
11662
11663     <class
11664         id="uvva"
11665         controller="open-ils.cstore open-ils.pcrud"
11666         oils_obj:fieldmapper="url_verify::verification_attempt"
11667         oils_persist:tablename="url_verify.verification_attempt"
11668         reporter:label="URL Verification Attempt"
11669     >
11670         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11671             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11672                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11673                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11674             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11675             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11676         </fields>
11677
11678         <links>
11679             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11680             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11681         </links>
11682
11683         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11684             <actions>
11685                 <create permission="URL_VERIFY">
11686                     <context link="session" field="owning_lib"/>
11687                 </create>
11688                 <retrieve permission="URL_VERIFY">
11689                     <context link="session" field="owning_lib"/>
11690                 </retrieve>
11691                 <update permission="URL_VERIFY">
11692                     <context link="session" field="owning_lib"/>
11693                 </update>
11694                 <delete permission="URL_VERIFY">
11695                     <context link="session" field="owning_lib"/>
11696                 </delete>
11697             </actions>
11698         </permacrud>
11699
11700     </class>
11701
11702     <class
11703         id="uvuv"
11704         controller="open-ils.cstore open-ils.pcrud"
11705         oils_obj:fieldmapper="url_verify::url_verification"
11706         oils_persist:tablename="url_verify.url_verification"
11707         reporter:label="URL Verification"
11708     >
11709         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11710             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11711                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11712                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11713             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11714             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11715             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11716             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11717                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11718         </fields>
11719
11720         <links>
11721             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11722             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11723             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11724         </links>
11725
11726         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11727             <actions>
11728                 <create permission="URL_VERIFY">
11729                     <context link="attempt" jump="session" field="owning_lib"/>
11730                 </create>
11731                 <retrieve permission="URL_VERIFY">
11732                     <context link="attempt" jump="session" field="owning_lib"/>
11733                 </retrieve>
11734                 <update permission="URL_VERIFY">
11735                     <context link="attempt" jump="session" field="owning_lib"/>
11736                 </update>
11737                 <delete permission="URL_VERIFY">
11738                     <context link="attempt" jump="session" field="owning_lib"/>
11739                 </delete>
11740             </actions>
11741         </permacrud>
11742
11743     </class>
11744
11745         <class
11746                 id="cfdi"
11747                 controller="open-ils.cstore open-ils.pcrud"
11748                 oils_obj:fieldmapper="config::filter_dialog_interface"
11749                 oils_persist:tablename="config.filter_dialog_interface"
11750                 reporter:label="FilterDialog Interface">
11751                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11752                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11753                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11754                 </fields>
11755                 <links>
11756                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11757                 </links>
11758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11759                         <actions>
11760                                 <retrieve />
11761                         </actions>
11762                 </permacrud>
11763         </class>
11764
11765         <class
11766                 id="cfdfs"
11767                 controller="open-ils.cstore open-ils.pcrud"
11768                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11769                 oils_persist:tablename="config.filter_dialog_filter_set"
11770                 reporter:label="FilterDialog Filter Set">
11771                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11772                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11773                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11774                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11775                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11776                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11777                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11778                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11779                 </fields>
11780                 <links>
11781                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11782                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11783                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11784                 </links>
11785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11786                         <actions>
11787                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11788                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11789                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11790                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11791                         </actions>
11792                 </permacrud>
11793
11794         </class>
11795
11796         <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">
11797                 <fields oils_persist:primary="code">
11798                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11799                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11800                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11801                 </fields>
11802                 <links/>
11803                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11804                         <actions>
11805                                 <retrieve/>
11806                         </actions>
11807                 </permacrud>
11808         </class>
11809
11810         <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">
11811                 <oils_persist:source_definition><![CDATA[
11812
11813             SELECT  b.id,
11814                     MAX(dcp.edit_date) AS last_delete_date
11815              FROM   biblio.record_entry b
11816                     JOIN asset.call_number cn ON (cn.record = b.id)
11817                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11818              WHERE  NOT b.deleted
11819              GROUP BY b.id
11820              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11821
11822                 ]]></oils_persist:source_definition>
11823                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11824                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11825                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11826                 </fields>
11827                 <links>
11828                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11829                 </links>
11830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11831                         <actions>
11832                                 <retrieve/>
11833                         </actions>
11834                 </permacrud>
11835         </class>
11836
11837         <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">
11838                 <oils_persist:source_definition><![CDATA[
11839
11840             -- -- 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.
11841             -- -- 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
11842             -- -- may not.
11843             -- SELECT
11844             --     bre.id AS bib_id,
11845             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11846             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11847             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11848             -- FROM (
11849                 SELECT
11850                     y.bre AS id,
11851                     COALESCE( x.copy_count, 0 ) AS copy_count,
11852                     y.hold_count AS hold_count,
11853                     (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
11854                 FROM (
11855                         SELECT
11856                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11857                             COUNT(*) AS hold_count
11858                         FROM action.hold_request h
11859                         WHERE
11860                             cancel_time IS NULL
11861                             AND fulfillment_time IS NULL
11862                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11863                         GROUP BY 1
11864                     )y LEFT JOIN (
11865                         SELECT 
11866                             (SELECT id
11867                                 FROM biblio.record_entry 
11868                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11869                             ) AS bre, 
11870                             COUNT(*) AS copy_count
11871                         FROM asset.copy
11872                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11873                         WHERE copy.holdable 
11874                             AND NOT copy.deleted 
11875                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11876                         GROUP BY 1
11877                     )x ON x.bre = y.bre
11878                 -- )z RIGHT JOIN (
11879                 --     SELECT id
11880                 --     FROM biblio.record_entry
11881                 --     WHERE NOT deleted
11882                 -- )bre ON (z.bib_id = bre.id)
11883                 
11884
11885                 ]]></oils_persist:source_definition>
11886                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11887                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11888                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11889                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11890                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11891                 </fields>
11892                 <links>
11893                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11894                 </links>
11895                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11896                         <actions>
11897                                 <retrieve/>
11898                         </actions>
11899                 </permacrud>
11900         </class>
11901
11902         <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">
11903                 <oils_persist:source_definition><![CDATA[
11904             SELECT *,
11905                 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,
11906                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11907             FROM
11908                 (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
11909                     FROM
11910                         action.hold_request ahr
11911                         JOIN reporter.hold_request_record rhrr USING (id)
11912                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11913                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11914                     WHERE
11915                         ahr.cancel_time IS NULL
11916                         AND ahr.fulfillment_time IS NULL
11917                     GROUP BY bib_record, pickup_lib
11918                 )x
11919                 JOIN
11920                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11921                     FROM
11922                         action.hold_request ahr
11923                         JOIN reporter.hold_request_record rhrr USING (id)
11924                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11925                     WHERE
11926                         ahr.cancel_time IS NULL
11927                         AND ahr.fulfillment_time IS NULL
11928                     GROUP BY bib_record
11929                 )y
11930                 USING (id)
11931                 ]]></oils_persist:source_definition>
11932                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11933                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11934                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11935                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11936                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11937                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11938                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11939                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11940                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11941                 </fields>
11942                 <links>
11943                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11944                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11945                 </links>
11946                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11947                         <actions>
11948                                 <retrieve/>
11949                         </actions>
11950                 </permacrud>
11951         </class>
11952
11953         <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) ">
11954                 <oils_persist:source_definition><![CDATA[
11955             WITH counts_at_ou AS (
11956                 SELECT  rhrr.bib_record AS id,
11957                         aou.id AS pickup_lib_or_desc,
11958                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11959                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11960                   FROM  actor.org_unit aou
11961                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11962                         action.hold_request ahr
11963                         JOIN reporter.hold_request_record rhrr USING (id)
11964                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11965                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11966                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11967                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11968                         AND (actor.org_unit_ancestor_at_depth(ahr.pickup_lib,aout.depth)).id = (actor.org_unit_ancestor_at_depth(ac.circ_lib,aout.depth)).id
11969                   GROUP BY 1, 2
11970             )
11971             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11972                    y.holds_everywhere, y.copy_count_everywhere,
11973                 CASE WHEN copy_count_at_or_below = 0 THEN 'Infinity'::FLOAT ELSE x.holds_at_or_below::FLOAT/x.copy_count_at_or_below END AS hold_copy_ratio_at_or_below_ou,
11974                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11975             FROM counts_at_ou x
11976                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11977                     FROM
11978                         action.hold_request ahr
11979                         JOIN reporter.hold_request_record rhrr USING (id)
11980                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11981                     WHERE
11982                         ahr.cancel_time IS NULL
11983                         AND ahr.fulfillment_time IS NULL
11984                     GROUP BY bib_record
11985                 )y
11986                 USING (id)
11987                 ]]></oils_persist:source_definition>
11988                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11989                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11990                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11991                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11992                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11993                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11994                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11995                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11996                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11997                 </fields>
11998                 <links>
11999                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12000                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
12001                 </links>
12002                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12003                         <actions>
12004                                 <retrieve/>
12005                         </actions>
12006                 </permacrud>
12007         </class>
12008
12009         <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">
12010                 <oils_persist:source_definition><![CDATA[
12011             SELECT
12012                 ac.id,
12013                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12014                 MAX(actac.xact_start) AS last_circ
12015             FROM asset.copy ac
12016                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12017             GROUP BY ac.id
12018
12019             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12020             --SELECT
12021             --    ac.id,
12022             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12023             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12024             --FROM asset.copy ac
12025             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12026             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12027             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12028                 ]]></oils_persist:source_definition>
12029                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12030                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12031                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12032                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12033                 </fields>
12034                 <links>
12035                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12036                 </links>
12037                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12038                         <actions>
12039                                 <retrieve/>
12040                         </actions>
12041                 </permacrud>
12042         </class>
12043
12044         <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">
12045                 <fields oils_persist:primary="id">
12046                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12047                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12048                 </fields>
12049                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12050                         <actions>
12051                                 <retrieve/>
12052                         </actions>
12053                 </permacrud>
12054         </class>
12055
12056         <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">
12057                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12058                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12059                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12060                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12061                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12062                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12063                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12064                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12065                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12066                 </fields>
12067                 <links>
12068                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12069                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12070                 </links>
12071                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12072                         <actions>
12073                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12074                                 <retrieve/>
12075                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12076                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12077                         </actions>
12078                 </permacrud>
12079         </class>
12080
12081         <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">
12082                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12083                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12084                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12085                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12086                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12087                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12088                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12089                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12090                 </fields>
12091                 <links>
12092                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12093                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12094                 </links>
12095                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12096                         <actions>
12097                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12098                                 <retrieve/>
12099                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12100                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12101                         </actions>
12102                 </permacrud>
12103         </class>
12104
12105
12106         <!-- ********************************************************************************************************************* -->
12107         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12108         <!-- ********************************************************************************************************************* -->
12109         <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">
12110                 <fields oils_persist:primary="id">
12111                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12112                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12113                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12114                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12115                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12116                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12117                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12118                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12119                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12120                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12121                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12122                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12123                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12124                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12125                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12126                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12127                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12128                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12129                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12130                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12131                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12132                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12133                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12134                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12135                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12136                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12137                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12138                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12139                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12140                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12141                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12142                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12143                 </fields>
12144                 <links>
12145                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12146                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12147                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12148                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12149                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12150                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12151                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12152                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12153                 </links>
12154         </class>
12155
12156         <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">
12157                 <fields oils_persist:primary="id">
12158                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12159                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12160                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12161                 </fields>
12162                 <links>
12163                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12164                 </links>
12165         </class>
12166
12167         <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">
12168                 <fields oils_persist:primary="id">
12169                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12170                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12171                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12172                 </fields>
12173                 <links>
12174                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12175                 </links>
12176         </class>
12177
12178         <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">
12179                 <fields oils_persist:primary="id">
12180                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12181
12182                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12183                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12184                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12185
12186                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12187                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12188                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12189
12190                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12191                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12192
12193                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12194                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12195                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12196
12197                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12198                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12199
12200                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12201                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12202                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12203
12204                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12205                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12206                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12207
12208                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12209                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12210                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12211                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12212
12213                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12214                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12215
12216                 </fields>
12217                 <links>
12218                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12219                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12220                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12221                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12222                 </links>
12223         </class>
12224
12225         <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">
12226                 <oils_persist:source_definition><![CDATA[
12227
12228             SELECT
12229                 po.ordering_agency AS ordering_agency,
12230                 po.id AS purchase_order,
12231                 li.id AS lineitem,
12232                 lid.id AS lineitem_detail,
12233                 cpa.id AS claim_policy_action
12234             FROM
12235                 acq.lineitem_detail lid
12236                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12237                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12238                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12239                 JOIN acq.claim_policy_action cpa ON (
12240                     cpa.claim_policy = cp.id
12241
12242                     -- we only care about claim policy actions whose claim
12243                     -- interval we'd reached or exceeded
12244                     AND (NOW() - cpa.action_interval) > po.order_date
12245
12246                     -- filter out all claim policy actions where claim events
12247                     -- have occurred on or after the action's action_interval
12248                     AND NOT EXISTS (
12249                         SELECT 1
12250                         FROM
12251                             acq.claim_event evt
12252                             JOIN acq.claim claim ON (
12253                                 claim.id = evt.claim
12254                                 AND claim.lineitem_detail = lid.id
12255                             )
12256                         WHERE
12257                             evt.event_date >= (po.order_date + cpa.action_interval)
12258                     )
12259                 )
12260             WHERE
12261                 lid.cancel_reason IS NULL
12262                 AND li.cancel_reason IS NULL -- belt/suspenders
12263                 AND po.cancel_reason IS NULL -- belt/suspenders
12264                 AND lid.recv_time IS NULL
12265                 AND po.state = 'on-order'
12266             ORDER BY 1, 2, 3, 4, 5
12267
12268                 ]]></oils_persist:source_definition>
12269                 <fields>
12270                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12271                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12272                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12273                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12274                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12275                 </fields>
12276                 <links>
12277                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12278                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12279                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12280                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12281                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12282                 </links>
12283         </class>
12284         <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">
12285                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12286                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12287                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12288                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12289                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12290                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12291                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12292                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12293                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12294                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12295                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12296                 </fields>
12297                 <links>
12298                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12299                 </links>
12300     </class>
12301         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12302                 <oils_persist:source_definition><![CDATA[
12303             SELECT * FROM acq.lineitem_summary 
12304                                 WHERE item_count > (invoice_count + cancel_count)
12305         ]]></oils_persist:source_definition>
12306                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12307                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12308                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12309                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12310                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12311                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12312                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12313                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12314                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12315                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12316                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12317                 </fields>
12318                 <links>
12319                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12320                 </links>
12321     </class>
12322         <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">
12323                 <oils_persist:source_definition><![CDATA[
12324
12325                         SELECT  t.*
12326                           FROM  action.transit_copy t
12327                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12328                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12329                           WHERE s.parent_ou <> d.parent_ou
12330
12331                 ]]></oils_persist:source_definition>
12332                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12333                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12334                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12335                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12336                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12337                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12338                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12339                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12340                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12341                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12342                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12343                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12344                 </fields>
12345                 <links>
12346                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12347                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12348                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12349                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12350                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12351                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12352                 </links>
12353         </class>
12354
12355     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12356                 <oils_persist:source_definition><![CDATA[
12357
12358         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12359                 SELECT
12360                         cp.id as copy,
12361                         COUNT(circ.id),
12362                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12363                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12364                 FROM
12365                         asset.copy cp
12366                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12367                 GROUP BY 1, 3, 4
12368                 UNION ALL
12369                 SELECT
12370                         cp.id as copy,
12371                         COUNT(circ.id),
12372                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12373                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12374                 FROM
12375                         asset.copy cp
12376                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12377                 GROUP BY 1, 3, 4
12378                 UNION ALL
12379                 SELECT
12380                         id as copy,
12381                         circ_count,
12382                         -1 AS year,
12383                         false as is_renewal
12384                 FROM
12385                         extend_reporter.legacy_circ_count
12386         )x GROUP BY 1, 3, 4
12387
12388                 ]]></oils_persist:source_definition>
12389         <fields>
12390             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12391             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12392             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12393             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12394         </fields>
12395                 <links>
12396                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12397                 </links>
12398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12399                         <actions>
12400                                 <retrieve/>
12401                         </actions>
12402                 </permacrud>
12403     </class>
12404
12405         <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">
12406                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12407                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12408                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12409                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12410                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12411                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12412                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12413                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12414                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12415                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12416                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12417                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12418                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12419                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12420                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12421                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12422                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12423                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12424                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12425                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12426                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12427                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12428                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12429                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12430                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12431                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12432                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12433                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12434                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12435                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12436                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12437                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
12438                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
12439                 </fields>
12440                 <links>
12441                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12442                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12443                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12444                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12445                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12446                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12447                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12448                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12449                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12450                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12451                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12452                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12453                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12454                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12455                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12456                 </links>
12457         </class>
12458
12459     <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">
12460         <fields oils_persist:primary="id">
12461             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12462             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12463             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12464             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12465             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12466             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12467             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12468             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12469             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12470             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12471             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12472             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12473             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12474             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12475             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12476             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12477             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12478             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12479             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12480             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12481             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12482             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12483             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12484             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12485             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12486             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12487             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12488             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12489             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12490             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12491             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12492             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12493             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12494             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12495         </fields>
12496         <links>
12497             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12498             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12499             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12500             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12501             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12502             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12503             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12504             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12505         </links>
12506     </class>
12507
12508     <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">
12509         <fields oils_persist:primary="id">
12510             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12511             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12512             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12513             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12514         </fields>
12515         <links>
12516             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12517             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12518         </links>
12519     </class>
12520
12521     <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">
12522         <fields oils_persist:primary="owning_lib">
12523             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12524             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12525             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12526         </fields>
12527         <links>
12528             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12529         </links>
12530     </class>
12531
12532     <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">
12533         <fields oils_persist:primary="id">
12534             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12535             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12536             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12537             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12538             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12539         </fields>
12540         <links>
12541             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12542             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12543             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12544         </links>
12545     </class>
12546
12547     <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">
12548         <fields oils_persist:primary="circ_lib">
12549             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12550             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12551             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12552             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12553         </fields>
12554         <links>
12555             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12556             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12557         </links>
12558     </class>
12559
12560     <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">
12561         <fields oils_persist:primary="id">
12562             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12563             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12564             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12565             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12566             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12567         </fields>
12568         <links>
12569             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12570             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12571             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12572         </links>
12573     </class>
12574
12575     <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">
12576         <fields oils_persist:primary="home_ou">
12577             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12578             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12579             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12580             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12581         </fields>
12582         <links>
12583             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12584             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12585         </links>
12586     </class>
12587         <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">
12588                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12589                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12590                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12591                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12592                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12593                 </fields>
12594                 <links>
12595                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12596                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12597                 </links>
12598                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12599                         <actions>
12600                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12601                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12602                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12603                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12604                         </actions>
12605                 </permacrud>
12606         </class>
12607         <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">
12608                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12609                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12610                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12611                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12612                 </fields>
12613                 <links>
12614                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12615                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12616                         </links>
12617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12618                 <actions>
12619                                 <create permission="ADMIN_ACQ_FUND_TAG">
12620                                         <context link="tag" field="owner"/>
12621                                 </create>
12622                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12623                                         <context link="tag" field="owner"/>
12624                                 </retrieve>
12625                                 <update permission="ADMIN_ACQ_FUND_TAG">
12626                                         <context link="tag" field="owner"/>
12627                                 </update>
12628                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12629                                         <context link="tag" field="owner"/>
12630                                 </delete>
12631                         </actions>
12632                 </permacrud>
12633         </class>
12634         <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">
12635                 <oils_persist:source_definition><![CDATA[
12636                 SELECT
12637                         poi.purchase_order AS purchase_order,
12638                         ii.invoice AS invoice,
12639                         NULL AS lineitem,
12640                         poi.id AS po_item,
12641                         NULL AS picklist
12642                 FROM
12643                         acq.po_item poi
12644                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12645                 UNION SELECT
12646                         jub.purchase_order AS purchase_order,
12647                         ie.invoice AS invoice,
12648                         jub.id AS lineitem,
12649                         NULL AS po_item,
12650                         jub.picklist AS picklist
12651                 FROM
12652                         acq.lineitem jub
12653                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12654                 UNION SELECT
12655                         ii.purchase_order AS purchase_order,
12656                         ii.invoice AS invoice,
12657                         NULL AS lineitem,
12658                         NULL AS po_item,
12659                         NULL AS picklist
12660                 FROM
12661                         acq.invoice_item ii
12662                 WHERE ii.po_item IS NULL
12663                 UNION SELECT
12664                         ie.purchase_order AS purchase_order,
12665                         ie.invoice AS invoice,
12666                         NULL AS lineitem,
12667                         NULL AS po_item,
12668                         NULL AS picklist
12669                 FROM
12670                         acq.invoice_entry ie
12671                 WHERE ie.lineitem IS NULL
12672                 UNION SELECT
12673                         NULL AS purchase_order,
12674                         NULL AS invoice,
12675                         jub.id AS lineitem,
12676                         NULL AS po_item,
12677                         jub.picklist AS picklist
12678                 FROM
12679                         acq.lineitem jub
12680                 WHERE jub.purchase_order IS NULL
12681                 ]]></oils_persist:source_definition>
12682                 <fields>
12683                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12684                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12685                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12686                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12687                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12688                 </fields>
12689                 <links>
12690                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12691                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12692                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12693                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12694                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12695                 </links>
12696         </class>
12697         <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">
12698                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12699                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12700                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12701                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12702                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12703                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12704                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12705                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12706                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12707                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12708                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12709                 </fields>
12710                 <links>
12711                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12712                 </links>
12713                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12714                         <actions>
12715                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12716                                 <retrieve/>
12717                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12718                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12719                         </actions>
12720                 </permacrud>
12721         </class>
12722
12723         <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">
12724                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12725                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12726                         <field name="date_applied" reporter:datatype="timestamp"/>
12727                         <field name="org" reporter:datatype="org_unit"/>
12728                         <field name="original_value" reporter:datatype="text"/>
12729                         <field name="new_value" reporter:datatype="text"/>
12730                         <field name="field_name" reporter:datatype="link"/>
12731                 </fields>
12732                 <links>
12733                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12734                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12735                 </links>
12736                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12737                         <actions>
12738                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12739                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12740                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12741                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12742                         </actions>
12743                 </permacrud>
12744         </class>
12745         <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">
12746                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12747                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12748                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12749                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12750                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12751                 </fields>
12752                 <links>
12753                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12754                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12755                 </links>
12756         </class>
12757         <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">
12758                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12759                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12760                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12761                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12762                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12763                 </fields>
12764                 <links>
12765                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12766                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12767                 </links>
12768         </class>
12769         <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">
12770                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12771                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12772                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12773                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
12774                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12775                 </fields>
12776                 <links>
12777                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12778                 </links>
12779                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12780                         <actions>
12781                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12782                                 <retrieve/>
12783                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12784                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12785                         </actions>
12786                 </permacrud>
12787         </class>
12788         <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">
12789                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12790                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12791                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
12792                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
12793                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
12794                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12795                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
12796                 </fields>
12797                 <links>
12798                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12799                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12800                 </links>
12801                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12802                         <actions>
12803                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12804                                 <retrieve/>
12805                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12806                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12807                         </actions>
12808                 </permacrud>
12809         </class>
12810         <class id="cctt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_tag_type" oils_persist:tablename="config.copy_tag_type" reporter:label="Copy Tag Types" oils_persist:field_safe="true">
12811                 <fields oils_persist:primary="code">
12812                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12813                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12814                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12815                 </fields>
12816                 <links>
12817                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12818                 </links>
12819                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12820                         <actions>
12821                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12822                                 <retrieve/>
12823                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12824                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12825                         </actions>
12826                 </permacrud>
12827         </class>
12828         <class id="acpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag" oils_persist:tablename="asset.copy_tag" reporter:label="Copy Tags" oils_persist:field_safe="true">
12829                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12830                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12831                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12832                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12833                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12834                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12835                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12836                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12837                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
12838                 </fields>
12839                 <links>
12840                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12841                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12842                 </links>
12843                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12844                         <actions>
12845                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12846                                 <retrieve/>
12847                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12848                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12849                         </actions>
12850                 </permacrud>
12851         </class>
12852         <class id="acptcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag_copy_map" oils_persist:tablename="asset.copy_tag_copy_map" reporter:label="Copy Tag Copy Map" oils_persist:field_safe="true">
12853                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12854                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12855                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12856                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12857                 </fields>
12858                 <links>
12859                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12860                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12861                 </links>
12862                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12863                         <actions>
12864                                 <create permission="UPDATE_COPY">
12865                     <context link="copy" field="circ_lib"/>
12866                 </create>
12867                                 <retrieve/>
12868                                 <update permission="UPDATE_COPY">
12869                     <context link="copy" field="circ_lib"/>
12870                 </update>
12871                                 <delete permission="UPDATE_COPY">
12872                     <context link="copy" field="circ_lib"/>
12873                 </delete>
12874                         </actions>
12875                 </permacrud>
12876         </class>
12877         <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">
12878         <oils_persist:source_definition><![CDATA[
12879         SELECT ahcm.target_copy AS id,count(*) AS count
12880          FROM
12881          action.hold_request ahr,
12882          action.hold_copy_map ahcm
12883          WHERE
12884          ahr.cancel_time IS NULL AND
12885          ahr.fulfillment_time IS NULL AND
12886          ahr.capture_time IS NULL AND
12887          ahr.id = ahcm.hold
12888          GROUP BY ahcm.target_copy
12889         ]]></oils_persist:source_definition>
12890         <fields oils_persist:primary="id">
12891             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12892             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12893         </fields>
12894         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12895             <actions>
12896                <retrieve/>
12897             </actions>
12898         </permacrud>
12899         </class>
12900
12901         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
12902                 oils_obj:fieldmapper="config::workstation_setting_type" 
12903                 oils_persist:tablename="config.workstation_setting_type" 
12904                 reporter:label="Workstation Setting Type">
12905                 <fields oils_persist:primary="name">
12906                         <field name="name" reporter:datatype="text"/>
12907                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
12908                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
12909                         <field name="datatype" reporter:datatype="text"/>
12910                         <field name="fm_class" reporter:datatype="text"/>
12911                         <field name="grp" reporter:datatype="link"/>
12912                 </fields>
12913                 <links>
12914                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
12915                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
12916                 </links>
12917                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12918                         <actions>
12919                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12920                                 <retrieve/>
12921                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12922                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12923                         </actions>
12924                 </permacrud>
12925         </class>
12926
12927         <!-- no pcrud access is granted for now, because it's assumed these
12928                          setting values will be applied and retrived via the API. -->
12929         <class id="awss" 
12930                 controller="open-ils.cstore"
12931                 oils_obj:fieldmapper="actor::workstation_setting" 
12932                 oils_persist:tablename="actor.workstation_setting" 
12933                 reporter:label="Workstation Setting">
12934                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
12935                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
12936                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
12937                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12938                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
12939                 </fields>
12940                 <links>
12941                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
12942                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
12943                 </links>
12944         </class>
12945
12946         <class id="cht" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_type" oils_persist:tablename="config.hold_type" reporter:label="Hold Type" oils_persist:readonly="true">
12947         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
12948                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
12949                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
12950                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
12951         </fields>
12952         </class>
12953
12954         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
12955                 oils_obj:fieldmapper="config::print_template" 
12956                 oils_persist:tablename="config.print_template" 
12957                 reporter:label="Print Templates">
12958                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
12959                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
12960                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
12961                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
12962                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
12963                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12964                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
12965                         <field name="content_type" reporter:datatype="text"/>
12966                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
12967                 </fields>
12968                 <links>
12969                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12970                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
12971                 </links>
12972                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12973                         <actions>
12974                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
12975                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
12976                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
12977                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
12978                         </actions>
12979                 </permacrud>
12980         </class>
12981
12982         <class id="cct" 
12983                 controller="open-ils.cstore open-ils.pcrud"
12984                 oils_obj:fieldmapper="config::carousel_type" 
12985                 oils_persist:tablename="config.carousel_type" 
12986                 reporter:label="Carousel Types">
12987                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
12988                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
12989                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
12990                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
12991                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
12992                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
12993                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
12994                 </fields>
12995                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12996                         <actions>
12997                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
12998                                 <retrieve/>
12999                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13000                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13001                         </actions>
13002                 </permacrud>
13003         </class>
13004
13005         <class id="cc" 
13006                 controller="open-ils.cstore open-ils.pcrud"
13007                 oils_obj:fieldmapper="container::carousel" 
13008                 oils_persist:tablename="container.carousel" 
13009                 reporter:label="Carousels">
13010                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
13011                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13012                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
13013                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13014                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13015                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13016                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13017                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13018                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13019                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13020                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13021                         <field reporter:label="Item Libraries" name="owning_lib_filter" reporter:datatype="text" />      <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
13022                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13023                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13024                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13025                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13026                 </fields>
13027                 <links>
13028                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13029                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13030                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13031                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13032                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13033                 </links>
13034                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13035                         <actions>
13036                                 <create permission="ADMIN_CAROUSEL" context_field="owner"/>
13037                                 <retrieve permission="ADMIN_CAROUSEL" context_field="owner"/>
13038                                 <update permission="ADMIN_CAROUSEL" context_field="owner"/>
13039                                 <delete permission="ADMIN_CAROUSEL" context_field="owner"/>
13040                         </actions>
13041                 </permacrud>
13042         </class>
13043
13044         <class id="ccou" 
13045                 controller="open-ils.cstore open-ils.pcrud"
13046                 oils_obj:fieldmapper="container::carousel_org_unit" 
13047                 oils_persist:tablename="container.carousel_org_unit" 
13048                 reporter:label="Carousels Visible at Library">
13049                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13050                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13051                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13052                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13053                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13054                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13055                 </fields>
13056                 <links>
13057                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13058                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13059                 </links>
13060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13061                         <actions>
13062                                 <create permission="ADMIN_CAROUSEL">
13063                                     <context link="carousel" field="owner" />
13064                                 </create>
13065                                 <retrieve permission="ADMIN_CAROUSEL">
13066                                     <context link="carousel" field="owner" />
13067                                 </retrieve>
13068                                 <update permission="ADMIN_CAROUSEL">
13069                                     <context link="carousel" field="owner" />
13070                                 </update>
13071                                 <delete permission="ADMIN_CAROUSEL">
13072                                     <context link="carousel" field="owner" />
13073                                 </delete>
13074                         </actions>
13075                 </permacrud>
13076         </class>
13077
13078         <class id="cra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remoteauth_profile" oils_persist:tablename="config.remoteauth_profile" reporter:label="Remote Patron Authentication Configuration Profile">
13079                 <fields oils_persist:primary="name">
13080                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13081                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13082                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13083                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13084                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13085                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13086                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13087                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13088                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13089                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13090                 </fields>
13091                 <links>
13092                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13093                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13094                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13095                 </links>
13096                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13097                         <actions>
13098                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13099                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13100                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13101                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13102                         </actions>
13103                 </permacrud>
13104         </class>
13105
13106         <!-- ********************************************************************************************************************* -->
13107 </IDL>
13108
13109 <!--
13110     vim:noet:ts=4:sw=4:
13111 -->