]> git.evergreen-ils.org Git - evergreen/pines.git/blob - Open-ILS/examples/fm_IDL.xml
PINES Customization for Carousels
[evergreen/pines.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
808                 oils_obj:fieldmapper="vandelay::session_tracker" 
809                 oils_persist:tablename="vandelay.session_tracker" 
810                 reporter:label="Vandelay Session Tracker">
811                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
812                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
813                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
814                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
815                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
816                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
817                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
818                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
819                                          queue or an auth queue and there's no IDL class for vandelay.queue .
820                                          parent table.
821                         -->
822                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
823                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
824                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
825                         <field reporter:label="State" name="state" reporter:datatype="text"/>
826                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
827                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
828                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
829                 </fields>
830                 <links>
831                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
832                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
833                 </links>
834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
835                         <actions>
836                                 <!-- created by the API -->
837                                 <retrieve global_required="true"
838                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
839                                 <update global_required="true"
840                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
841                                         <context link="workstation" field="owning_lib"/>
842                                 </update>
843                                 <delete 
844                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
845                                         <context link="workstation" field="owning_lib"/>
846                                 </delete>
847                         </actions>
848                 </permacrud>
849         </class>
850
851         <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">
852                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
853                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
854                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
855                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
856                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
857                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
858                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
859                 </fields>
860                 <links>
861                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
862                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
863                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
864                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
865                 </links>
866         </class>
867
868     <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">
869         <fields oils_persist:primary="name">
870             <field reporter:label="Name" name="name" reporter:datatype="text"/>
871             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
872             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
873             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
874         </fields>
875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
876             <actions>
877                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
878                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
879                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
880                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881             </actions>
882         </permacrud>
883     </class>
884
885     <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">
886         <fields oils_persist:primary="id">
887             <field reporter:label="ID" name="id" reporter:datatype="id"/>
888             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
889             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
890             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
891             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
892         </fields>
893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
894             <actions>
895                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
896                 <retrieve/>
897                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
898                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
899             </actions>
900         </permacrud>
901     </class>
902
903         <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">
904                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
905                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
906                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
907                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
908                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
909                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
910                 </fields>
911                 <links>
912                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
913                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
914                 </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
918                 <retrieve/>
919                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
920                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <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">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
928                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
929                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
930         </fields>
931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
932             <actions>
933                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
934                 <retrieve/>
935                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
936                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
937             </actions>
938         </permacrud>
939         </class>
940
941         <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">
942                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
943                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
944                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
945                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
946                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
947                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
948                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
949                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
950                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
951                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
952                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
953                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
954         </fields>
955                 <links>
956                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
957                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
958         </links>
959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960             <actions>
961                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
962                 <retrieve/>
963                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
964                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
965             </actions>
966         </permacrud>
967         </class>
968
969         <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">
970                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
971                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
972                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
973                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
974                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
975                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
976                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
977                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
978                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
979                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
980                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
981         </fields>
982                 <links>
983                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
984                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
985         </links>
986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
987             <actions>
988                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
989                 <retrieve/>
990                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
991                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
992             </actions>
993         </permacrud>
994         </class>
995
996         <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">
997                 <fields oils_persist:primary="name">
998                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
999                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1000                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1001                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1002                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1003                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1004                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1005                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1006                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1007                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1008                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1009                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1010                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1011                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1012                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1013                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1014                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1015                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1016                 </fields>
1017                 <links>
1018                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1019                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1020                 </links>
1021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1022             <actions>
1023                 <create permission="ADMIN_SVF" global_required="true"/>
1024                 <retrieve/>
1025                 <update permission="ADMIN_SVF" global_required="true"/>
1026                 <delete permission="ADMIN_SVF" global_required="true"/>
1027             </actions>
1028         </permacrud>
1029         </class>
1030
1031         <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">
1032                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1033                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1034                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1035                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1036             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
1037                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1038                 </fields>
1039                 <links/>
1040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1041             <actions>
1042                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1043                 <retrieve/>
1044                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1045                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1046             </actions>
1047         </permacrud>
1048         </class>
1049
1050         <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">
1051                 <fields oils_persist:primary="coded_value">
1052                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1053                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1054                 </fields>
1055                 <links>
1056                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1057                 </links>
1058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1059             <actions>
1060                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1061                 <retrieve/>
1062                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1063                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1064             </actions>
1065         </permacrud>
1066         </class>
1067
1068         <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">
1069                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1070                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1071                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1072                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1073                 </fields>
1074                 <links>
1075                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1076                 </links>
1077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1078             <actions>
1079                 <retrieve/>
1080             </actions>
1081         </permacrud>
1082         </class>
1083
1084
1085         <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">
1086                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1087                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1088                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1089                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1090                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1091                 </fields>
1092                 <links>
1093                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1094                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1095                 </links>
1096         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1097             <actions>
1098                 <retrieve/>
1099             </actions>
1100         </permacrud>
1101         </class>
1102
1103
1104         <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">
1105                 <fields oils_persist:primary="source">
1106                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1107                         <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 -->
1108                 </fields>
1109                 <links>
1110                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1111                 </links>
1112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1113             <actions>
1114                 <retrieve/>
1115             </actions>
1116         </permacrud>
1117         </class>
1118
1119         <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">
1120                 <fields>
1121                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1122                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1123                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1124                 </fields>
1125                 <links>
1126                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1127                 </links>
1128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1129             <actions>
1130                 <retrieve/>
1131             </actions>
1132         </permacrud>
1133         </class>
1134
1135         <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">
1136                 <fields oils_persist:primary="id">
1137                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1138                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1139                 </fields>
1140                 <links>
1141                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1142                 </links>
1143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1144             <actions>
1145                 <retrieve/>
1146             </actions>
1147         </permacrud>
1148         </class>
1149
1150         <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">
1151                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1152                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1153                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1154                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1155                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1156                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1157                 </fields>
1158                 <links>
1159                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1160                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1161                 </links>
1162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1163             <actions>
1164                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1165                 <retrieve/>
1166                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1167                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1168             </actions>
1169         </permacrud>
1170         </class>
1171
1172         <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">
1173                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1174                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1175                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1176                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1177                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1178                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1179                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1180                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1181             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1182             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1183             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1184                 </fields>
1185                 <links>
1186                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1187                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1188                 </links>
1189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1190             <actions>
1191                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1192                 <retrieve/>
1193                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1194                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1195             </actions>
1196         </permacrud>
1197         </class>
1198
1199         <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">
1200                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1201                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1202                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1203                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1204                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1205                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1206                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1207                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1208                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1209                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1210                 </fields>
1211                 <links>
1212                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1213                 </links>
1214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1215             <actions>
1216                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1217                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1218                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1219                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220             </actions>
1221         </permacrud>
1222         </class>
1223
1224     <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">
1225         <fields oils_persist:primary="name">
1226             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1227             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1228             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1229             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1230             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1231             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1232             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1233             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1234             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1235             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1236         </fields>
1237         <links>
1238             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1239             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1240         </links>
1241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1242             <actions>
1243                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1244                 <retrieve/>
1245                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1246                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1247             </actions>
1248         </permacrud>
1249     </class>
1250
1251     <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">
1252         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1253             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1254             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1255             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1256             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1257             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1258             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1259             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1260         </fields>
1261         <links>
1262             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1263         </links>
1264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1265             <actions>
1266                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1267                 <retrieve/>
1268                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1269                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1270             </actions>
1271         </permacrud>
1272     </class>
1273
1274     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1275                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1276                         oils_persist:tablename="config.z3950_index_field_map" 
1277                         reporter:label="Z39.50 Index Field Map">
1278         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1279             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1280             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1281             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1282             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1283             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1284             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1285         </fields>
1286         <links>
1287             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1288             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1289             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1290         </links>
1291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1292             <actions>
1293                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1294                 <retrieve/>
1295                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1296                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1297             </actions>
1298         </permacrud>
1299     </class>
1300
1301
1302         <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">
1303                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1304                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1305                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1306                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1307                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1308                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1309                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1310                 </fields>
1311                 <links>
1312             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1313             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1314                 </links>
1315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1316                         <actions>
1317                                 <retrieve/>
1318                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1319                         </actions>
1320                 </permacrud>
1321         </class>
1322
1323         <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">
1324                 <fields oils_persist:primary="key">
1325                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1326                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1327                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1328                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1329                 </fields>
1330                 <links/>
1331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1332                         <actions>
1333                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1334                                 <retrieve/>
1335                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1336                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1337                         </actions>
1338                 </permacrud>
1339         </class>
1340
1341         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1342                 <fields oils_persist:primary="module">
1343                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1344                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1345                 </fields>
1346                 <links/>
1347         </class>
1348
1349         <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">
1350                 <fields oils_persist:primary="module">
1351                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1352                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1353                 </fields>
1354                 <links/>
1355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1356                         <actions>
1357                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1358                                 <retrieve/>
1359                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1360                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1361                         </actions>
1362                 </permacrud>
1363         </class>
1364
1365         <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">
1366                 <fields oils_persist:primary="module">
1367                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1368                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1369                 </fields>
1370                 <links/>
1371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1372                         <actions>
1373                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1374                                 <retrieve/>
1375                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1376                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1377                         </actions>
1378                 </permacrud>
1379         </class>
1380
1381         <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">
1382                 <fields oils_persist:primary="module">
1383                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1384                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1385                 </fields>
1386                 <links/>
1387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1388                         <actions>
1389                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1390                                 <retrieve/>
1391                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1392                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1393                         </actions>
1394                 </permacrud>
1395         </class>
1396
1397         <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">
1398                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1399                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1400                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1401                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1402                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1403                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1404                 </fields>
1405                 <links>
1406                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1407                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1408                 </links>
1409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1410                         <actions>
1411                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1412                     <context link="event_def" field="owner"/>
1413                 </create>
1414                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1415                     <context link="event_def" field="owner"/>
1416                 </retrieve>
1417                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1418                     <context link="event_def" field="owner"/>
1419                 </update>
1420                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1421                     <context link="event_def" field="owner"/>
1422                 </delete>
1423                         </actions>
1424                 </permacrud>
1425         </class>
1426
1427         <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">
1428                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1429                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1430                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1431                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1432                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1433                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1434                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1435                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1436                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1437                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1438                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1439                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1440                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1441                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1442                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1443                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1444                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1445                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1446                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1447                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1448                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1449                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1450                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1451                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1452                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1453                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1454                 </fields>
1455                 <links>
1456                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1457                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1458                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1459                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1460                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1461                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1462                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1463                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1464                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1465                 </links>
1466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1467                         <actions>
1468                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1469                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1470                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1471                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1472                         </actions>
1473                 </permacrud>
1474         </class>
1475
1476         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1477                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1478                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1479                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1480                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1481                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1482                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1483                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1484                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1485                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1486                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1487                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1488                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1489                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1490                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1491                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1492                 </fields>
1493                 <links>
1494                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1495                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1496                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1497                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1498                 </links>
1499         </class>
1500
1501         <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">
1502                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1503                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1504                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1505                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1506                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1507                 </fields>
1508                 <links>
1509                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1510                 </links>
1511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1512                         <actions>
1513                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1514                     <context link="event_def" field="owner"/>
1515                 </create>
1516                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1517                     <context link="event_def" field="owner"/>
1518                 </retrieve>
1519                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1520                     <context link="event_def" field="owner"/>
1521                 </update>
1522                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1523                     <context link="event_def" field="owner"/>
1524                 </delete>
1525                         </actions>
1526                 </permacrud>
1527         </class>
1528
1529         <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">
1530                 <oils_persist:source_definition><![CDATA[
1531                 SELECT  atevdef.hook,
1532                         atevdef.name,
1533                         atevdef.reactor,
1534                         atev.id,
1535                         atev.event_def,
1536                         atev.add_time,
1537                         atev.run_time,
1538                         atev.start_time,
1539                         atev.update_time,
1540                         atev.complete_time,
1541                         atev.update_process,
1542                         atev.state,
1543                         atev.user_data,
1544                         atev.template_output,
1545                         atev.error_output,
1546                         atev.async_output,
1547                         targ_circ.id AS target_circ,
1548                         targ_ahr.id AS target_hold,
1549                         COALESCE(
1550                                 targ_circ.circ_lib,
1551                                 targ_ahr.pickup_lib
1552                         ) AS perm_lib
1553                 FROM action_trigger.event atev
1554                 JOIN action_trigger.event_definition atevdef ON
1555                         (atevdef.id = atev.event_def)
1556                 JOIN action_trigger.hook ath ON
1557                         (ath.key = atevdef.hook)
1558                 LEFT JOIN action.circulation targ_circ ON
1559                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1560                 LEFT JOIN action.hold_request targ_ahr ON
1561                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1562                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1563                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1564                                 'circ.staff.max_visible_event_age',
1565                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1566                         ) UNION
1567                         SELECT '1000 YEARS'::INTERVAL AS value
1568                 ) ous)
1569                 ]]></oils_persist:source_definition>
1570                 <fields oils_persist:primary="id">
1571                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1572                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1573                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1574                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1575                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1576                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1577                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1578                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1579                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1580                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1581                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1582                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1583                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1584                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1585                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1586                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1587                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1588                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1589                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1590                 </fields>
1591                 <links>
1592                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1593                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1594                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1595                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1596                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1597                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1598                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1599                 </links>
1600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1601                         <actions>
1602                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1603                         </actions>
1604                 </permacrud>
1605         </class>
1606
1607         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1608                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1609                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1610                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1611                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1612                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1613                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1614                 </fields>
1615                 <links>
1616                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1617                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1618                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1619                 </links>
1620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1621                         <actions>
1622                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1623                         </actions>
1624                 </permacrud>
1625         </class>
1626
1627         <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">
1628                 <fields oils_persist:primary="code">
1629                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1630                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1631                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1632                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1633                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1634                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1635                 </fields>
1636                 <links/>
1637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1638             <actions>
1639                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1640                 <retrieve/>
1641                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1642                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1643             </actions>
1644         </permacrud>
1645         </class>
1646
1647         <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">
1648                 <fields oils_persist:primary="code">
1649                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1650                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1651                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1652                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1653                 </fields>
1654                 <links/>
1655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1656             <actions>
1657                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1658                 <retrieve/>
1659                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1660                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1661             </actions>
1662         </permacrud>
1663         </class>
1664
1665         <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">
1666                 <fields oils_persist:primary="code">
1667                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1668                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1669                 </fields>
1670                 <links/>
1671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1672             <actions>
1673                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1674                 <retrieve/>
1675                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1676                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1677             </actions>
1678         </permacrud>
1679         </class>
1680
1681         <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">
1682                 <fields oils_persist:primary="code">
1683                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1684                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1685                 </fields>
1686                 <links/>
1687         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1688             <actions>
1689                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1690                 <retrieve/>
1691                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1692                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1693             </actions>
1694         </permacrud>
1695         </class>
1696
1697         <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">
1698                 <fields oils_persist:primary="code">
1699                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1700                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1701                 </fields>
1702                 <links/>
1703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1704             <actions>
1705                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1706                 <retrieve/>
1707                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1708                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <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">
1714                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1715                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <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">
1730                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1731                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1733                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1734                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1735                 </fields>
1736         <links>
1737             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1738             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1739             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1740         </links>
1741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1742             <actions>
1743                 <create permission="UPDATE_COPY">
1744                     <context link="target_copy" field="circ_lib"/>
1745                 </create>
1746                 <retrieve/>
1747                 <update permission="UPDATE_COPY">
1748                     <context link="target_copy" field="circ_lib"/>
1749                 </update>
1750                 <delete permission="UPDATE_COPY">
1751                     <context link="target_copy" field="circ_lib"/>
1752                 </delete>
1753             </actions>
1754         </permacrud>
1755         </class>
1756
1757         <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">
1758                 <fields oils_persist:primary="code">
1759                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1760                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1761                 </fields>
1762                 <links/>
1763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1764             <actions>
1765                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1766                 <retrieve/>
1767                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1768                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1769             </actions>
1770         </permacrud>
1771         </class>
1772
1773         <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">
1774                 <fields oils_persist:primary="code">
1775                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1776                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1777                 </fields>
1778                 <links/>
1779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1780             <actions>
1781                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1782                 <retrieve/>
1783                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1784                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1785             </actions>
1786         </permacrud>
1787         </class>
1788
1789         <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">
1790                 <fields oils_persist:primary="code">
1791                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1792                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1793                 </fields>
1794                 <links/>
1795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1796             <actions>
1797                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1798                 <retrieve/>
1799                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1800                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1801             </actions>
1802         </permacrud>
1803         </class>
1804
1805     <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">
1806         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1807             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1808             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1809             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1810             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1811             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1812             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1813             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1814             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1815             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1816             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1817             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1818             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1819             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1820             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1821             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1822             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1823             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1824         </fields>
1825         <links/>
1826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1827             <actions>
1828                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1829                 <retrieve/>
1830                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1831                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1832             </actions>
1833         </permacrud>
1834     </class>
1835
1836     <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">
1837         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1838             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1839             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1840             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1841             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1842             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1843             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1844             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1845             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1846             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1847             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1848             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1849             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1850             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1851             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1852             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1853             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1854             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1855             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1856             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1857         </fields>
1858         <links/>
1859         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1860             <actions>
1861                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1862                 <retrieve/>
1863                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1864                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1865             </actions>
1866         </permacrud>
1867     </class>
1868
1869     <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">
1870         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1871             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1872             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1873             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1874             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1875             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1876         </fields>
1877         <links>
1878             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1879             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1880             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1881         </links>
1882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1883             <actions>
1884                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1885                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1886                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1887                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1888             </actions>
1889         </permacrud>
1890     </class>
1891
1892         <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">
1893                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1894                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1895                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1896                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1897                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1898                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1899                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1900                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1901                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1902                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1903                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1904                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1905                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1906                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1907                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1908                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1909                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1910             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1911                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1912                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1913                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1914                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1915                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1916                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1917                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1918                 </fields>
1919                 <links>
1920                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1921                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1922                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1923                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1924                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1925                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1926                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1927                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1928                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1929                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1930                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1931                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1932                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1933             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1934                 </links>
1935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1936             <actions>
1937                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1938                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1939                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1940                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1941             </actions>
1942         </permacrud>
1943         </class>
1944
1945         <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">
1946                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1947                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1948                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1949                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1950                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1951                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1952                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1953                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1954                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1955                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1956                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1957                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1958                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1959                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1960                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1961                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1962             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1963                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1964                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1965             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1966                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1967                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1968                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1969                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1970             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1971             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1972             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1973                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1974                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1975                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1976                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1977                 </fields>
1978                 <links>
1979                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1980                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1981                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1982                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1983                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1984                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1985                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1986                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1987                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1988                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1989                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1990                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1991                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1992                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1993             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1994                 </links>
1995         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1996             <actions>
1997                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1998                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1999                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2000                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2001             </actions>
2002         </permacrud>
2003         </class>
2004
2005     <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">
2006         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2007             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2008             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2009             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2010         </fields>
2011         <links/>
2012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2013             <actions>
2014                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2015                 <retrieve/>
2016                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2017                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2018             </actions>
2019         </permacrud>
2020     </class>
2021
2022     <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">
2023         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2024             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2025             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2026             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2027             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2028             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2029             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2030             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2031         </fields>
2032         <links>
2033             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2034         </links>
2035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2036             <actions>
2037                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2038                 <retrieve/>
2039                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2040                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2041             </actions>
2042         </permacrud>
2043     </class>
2044
2045     <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">
2046         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2047             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2048             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2049             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2050             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2051             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2052         </fields>
2053         <links>
2054             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2055             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2056         </links>
2057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2058             <actions>
2059                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2060                     <context link="matchpoint" field="org_unit"/>
2061                 </create>
2062                 <retrieve/>
2063                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2064                     <context link="matchpoint" field="org_unit"/>
2065                 </update>
2066                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="matchpoint" field="org_unit"/>
2068                 </delete>
2069             </actions>
2070         </permacrud>
2071     </class>
2072
2073     <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">
2074         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2075             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2076             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2077             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2078         </fields>
2079         <links>
2080             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2081             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2082         </links>
2083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2084             <actions>
2085                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2086                     <context link="limit_set" field="owning_lib"/>
2087                 </create>
2088                 <retrieve/>
2089                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2090                     <context link="limit_set" field="owning_lib"/>
2091                 </update>
2092                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2093                     <context link="limit_set" field="owning_lib"/>
2094                 </delete>
2095             </actions>
2096         </permacrud>
2097     </class>
2098     <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">
2099         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2100             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2101             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2102             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2103         </fields>
2104         <links>
2105             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2106             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2107         </links>
2108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2109             <actions>
2110                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2111                     <context link="limit_set" field="owning_lib"/>
2112                 </create>
2113                 <retrieve/>
2114                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2115                     <context link="limit_set" field="owning_lib"/>
2116                 </update>
2117                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2118                     <context link="limit_set" field="owning_lib"/>
2119                 </delete>
2120             </actions>
2121         </permacrud>
2122     </class>
2123
2124     <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">
2125         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2126             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2127             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2128             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2129             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2130         </fields>
2131         <links>
2132             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2133             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2134         </links>
2135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2136             <actions>
2137                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2138                     <context link="limit_set" field="owning_lib"/>
2139                 </create>
2140                 <retrieve/>
2141                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2142                     <context link="limit_set" field="owning_lib"/>
2143                 </update>
2144                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2145                     <context link="limit_set" field="owning_lib"/>
2146                 </delete>
2147             </actions>
2148         </permacrud>
2149     </class>
2150
2151         <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">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2153                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2154                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2155                 </fields>
2156                 <links/>
2157         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2158             <actions>
2159                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2160                 <retrieve/>
2161                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2162                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2163             </actions>
2164         </permacrud>
2165         </class>
2166
2167         <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">
2168                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2169                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2170                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2171                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2172                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2173                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2174                 </fields>
2175                 <links>
2176                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2177                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2178                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2179                 </links>
2180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2181             <actions>
2182                 <create permission="ADMIN_SURVEY">
2183                     <context link="survey" field="owner"/>
2184                 </create>
2185                 <retrieve/>
2186                 <update permission="ADMIN_SURVEY">
2187                     <context link="survey" field="owner"/>
2188                 </update>
2189                 <delete permission="ADMIN_SURVEY">
2190                     <context link="survey" field="owner"/>
2191                 </delete>
2192             </actions>
2193         </permacrud>
2194         </class>
2195         <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">
2196                 <fields oils_persist:primary="id" oils_persist:sequence="">
2197                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2198                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2199                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2200                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2201                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2202                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2203                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2204                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2205                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2206                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2207                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2208                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2209                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2210                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2211                 </fields>
2212                 <links>
2213                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2214                 </links>
2215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2216                         <actions>
2217                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2218                                         <context link="usr" field="home_ou" />
2219                                 </retrieve>
2220                         </actions>
2221                 </permacrud>
2222         </class>
2223         <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">
2224                 <fields oils_persist:primary="id" oils_persist:sequence="">
2225                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2226                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2227                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2228                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2230                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2231                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2232                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2233                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2234                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2235                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2236                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2237                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2238                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2239                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2240                 </fields>
2241                 <links>
2242                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2243                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2244                 </links>
2245         </class>
2246         <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">
2247                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2248                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2249                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2251                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2253                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2260                 </links>
2261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262                         <actions> <!-- created magically, so no create action -->
2263                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2264                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2265                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2266                         </actions>
2267                 </permacrud>
2268         </class>
2269         <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)">
2270                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2271                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2272                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2273                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2274                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2275                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2276                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2277                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2278                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2279                 </fields>
2280                 <links>
2281                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2282                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2283                 </links>
2284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2285                         <actions> <!-- created magically, so no create action -->
2286                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2287                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2288                         </actions>
2289                 </permacrud>
2290         </class>
2291         <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">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2293                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2294                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2295                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2296                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2297                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2298                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2299                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2300                 </fields>
2301                 <links>
2302                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2303                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2304                 </links>
2305         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2306             <actions>
2307                 <create permission="UPDATE_USER" context_field="owner">
2308                     <context link="usr" field="home_ou"/>
2309                 </create>
2310                                 <!-- note: public notes are still accessible via API -->
2311                 <retrieve permission="UPDATE_USER">
2312                     <context link="usr" field="home_ou"/>
2313                                 </retrieve>
2314                 <update permission="UPDATE_USER">
2315                     <context link="usr" field="home_ou"/>
2316                                 </update>
2317                 <delete permission="UPDATE_USER">
2318                     <context link="usr" field="home_ou"/>
2319                                 </delete>
2320             </actions>
2321         </permacrud>
2322         </class>
2323         <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">
2324                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_privacy_waiver_id_seq">
2325                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2326                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2327                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2328                         <field reporter:label="Place Holds?" name="place_holds" reporter:datatype="bool" />
2329                         <field reporter:label="Pick Up Holds?" name="pickup_holds" reporter:datatype="bool" />
2330                         <field reporter:label="View Borrowing History?" name="view_history" reporter:datatype="bool" />
2331                         <field reporter:label="Check Out Items?" name="checkout_items" reporter:datatype="bool" />
2332                 </fields>
2333                 <links>
2334                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2335                 </links>
2336                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2337                         <actions>
2338                                 <create permission="UPDATE_USER">
2339                                         <context link="usr" field="home_ou"/>
2340                                 </create>
2341                                 <retrieve permission="VIEW_USER">
2342                                         <context link="usr" field="home_ou"/>
2343                                 </retrieve>
2344                                 <update permission="UPDATE_USER">
2345                                         <context link="usr" field="home_ou"/>
2346                                 </update>
2347                                 <delete permission="UPDATE_USER">
2348                                         <context link="usr" field="home_ou"/>
2349                                 </delete>
2350                         </actions>
2351                 </permacrud>
2352         </class>
2353         <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">
2354                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2355                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2356                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2357                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2358                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2359                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2360                 </fields>
2361                 <links>
2362                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2363                 </links>
2364         </class>
2365         <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">
2366                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2367                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2368                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2369                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2370                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2371                 </fields>
2372                 <links>
2373                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2374                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2375                 </links>
2376                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2377                         <actions>
2378                                 <retrieve permission="VIEW_USER">
2379                                         <context link="usr" field="home_ou" />
2380                                 </retrieve>
2381                         </actions>
2382                 </permacrud>
2383         </class>
2384         <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">
2385                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2386                         <field name="field" reporter:datatype="link"/>
2387                         <field name="id" reporter:datatype="id" />
2388                         <field name="source" reporter:datatype="link"/>
2389                         <field name="value" reporter:datatype="text"/>
2390                 </fields>
2391                 <links>
2392                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2393                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2394                 </links>
2395         </class>
2396         <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">
2397                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2398                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2399                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2400                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2401                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2402                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2403                 </fields>
2404                 <links>
2405                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2406                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2407                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2408                 </links>
2409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2410                         <actions>
2411                                 <retrieve/>
2412                         </actions>
2413                 </permacrud>
2414         </class>
2415         <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">
2416                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2417                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2418                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2419                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2420                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2421                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2422                 </fields>
2423                 <links>
2424                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2425                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2426                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2427                 </links>
2428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2429                         <actions>
2430                                 <retrieve/>
2431                         </actions>
2432                 </permacrud>
2433         </class>
2434         <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">
2435                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2436                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2437                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2438                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2439                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2440                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2441                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2442                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2443                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2444                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2445                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2446                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2447                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2448                 </fields>
2449                 <links>
2450                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2451                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2452                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2453                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2454                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2455                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2456                 </links>
2457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2458             <actions>
2459                 <create permission="TRANSIT_COPY" context_field="owner">
2460                     <context link="target_copy" field="circ_lib"/>
2461                 </create>
2462                 <retrieve/>
2463                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2464                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2465             </actions>
2466         </permacrud>
2467         </class>
2468         <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">
2469                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2470                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2471                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2472                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2473                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2474                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2475                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2476                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2477                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2478                 </fields>
2479                 <links>
2480                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2481                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2482                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2483                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2484                 </links>
2485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2486             <actions>
2487                 <create permission="ADMIN_SURVEY">
2488                     <context link="survey" field="owner"/>
2489                 </create>
2490                 <retrieve permission="VIEW_USER">
2491                     <context link="usr" field="home_ou"/>
2492                 </retrieve>
2493                 <update permission="ADMIN_SURVEY">
2494                     <context link="survey" field="owner"/>
2495                 </update>
2496                 <delete permission="ADMIN_SURVEY">
2497                     <context link="survey" field="owner"/>
2498                 </delete>
2499             </actions>
2500         </permacrud>
2501         </class>
2502         <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">
2503                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2504                         <field name="bucket" />
2505                         <field name="id" reporter:datatype="id" />
2506                         <field name="target_copy" reporter:datatype="link"/>
2507                         <field name="create_time" reporter:datatype="timestamp" />
2508                         <field name="pos" reporter:datatype="int" />
2509                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2510                 </fields>
2511                 <links>
2512                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2513                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2514             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2515                 </links>
2516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2517                         <actions>
2518                                 <retrieve permission="ADMIN_COPY_BUCKET">
2519                     <context link="bucket" owning_lib="owning_lib"/>
2520                 </retrieve>
2521             </actions>
2522         </permacrud>
2523         </class>
2524         <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">
2525                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2526                         <field name="id" reporter:datatype="id" />
2527                         <field name="item" reporter:datatype="link"/>
2528                         <field name="note" reporter:datatype="text" />
2529                 </fields>
2530                 <links>
2531                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2532                 </links>
2533         </class>
2534
2535         <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">
2536                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2537                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2538                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2539                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2540                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2541                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2542                 </fields>
2543                 <links>
2544                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2545                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2546                 </links>
2547                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2548                         <actions>
2549                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2550                                 <retrieve/>
2551                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2552                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2553                         </actions>
2554                 </permacrud>
2555         </class>
2556
2557         <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">
2558                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2559                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2560                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2561                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2562                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2563                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2564                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2565                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2566                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2567                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2568                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2569                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2570                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2571                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2572                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2573                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2574                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2575                 </fields>
2576                 <links>
2577                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2578                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2579                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2580                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2581                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2582                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2583                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2584                 </links>
2585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2586                         <actions>
2587                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2588                                 <retrieve/>
2589                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2590                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2591                         </actions>
2592                 </permacrud>
2593         </class>
2594
2595         <class id="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">
2596                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2597                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2598                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2599                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2600                 </fields>
2601                 <links>
2602                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2603                 </links>
2604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2605                         <actions>
2606                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2607                                 <retrieve/>
2608                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2609                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2610                         </actions>
2611                 </permacrud>
2612         </class>
2613
2614         <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">
2615                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2616                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2617                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2618                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2619                 </fields>
2620                 <links>
2621                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2622                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2623                 </links>
2624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2625                         <actions>
2626                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2627                                 <retrieve/>
2628                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2629                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2630                         </actions>
2631                 </permacrud>
2632         </class>
2633
2634         <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">
2635                 <fields oils_persist:primary="code">
2636                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2637                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2638                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2639                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2640                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2641                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2642                 </fields>
2643                 <links>
2644                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2645                 </links>
2646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2647                         <actions>
2648                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2649                                 <retrieve/>
2650                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2651                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2652                         </actions>
2653                 </permacrud>
2654         </class>
2655
2656         <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">
2657                 <fields oils_persist:primary="code">
2658                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2659                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2660                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2661                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2662                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2663                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2664                 </fields>
2665                 <links>
2666                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2667                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2668                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2669                 </links>
2670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2671                         <actions>
2672                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2673                                 <retrieve/>
2674                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2675                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2676                         </actions>
2677                 </permacrud>
2678         </class>
2679
2680     <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">
2681         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2682             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2683             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2684             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2685         </fields>
2686         <links>
2687             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2688             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2689         </links>
2690         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2691             <actions>
2692                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2693                 <retrieve/>
2694                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2695                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2696             </actions>
2697         </permacrud>
2698     </class>
2699
2700         <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">
2701                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2702                         <field name="active" reporter:datatype="bool"/>
2703                         <field name="create_date" reporter:datatype="timestamp"/>
2704                         <field name="creator" />
2705                         <field name="deleted" reporter:datatype="bool"/>
2706                         <field name="edit_date" reporter:datatype="timestamp"/>
2707                         <field name="editor" />
2708                         <field name="id" reporter:datatype="id" />
2709                         <field name="last_xact_id" />
2710                         <field name="marc" />
2711                         <field name="source" />
2712                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2713                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2714                         <field name="heading" />
2715                         <field name="simple_heading" />
2716                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2717                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2718                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2719                 </fields>
2720                 <links>
2721                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2722                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2723                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2724                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2725                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2726                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2727                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2728                 </links>
2729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2730                         <actions>
2731                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2732                                 <retrieve/>
2733                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2734                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2735                         </actions>
2736                 </permacrud>
2737         </class>
2738         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2739                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2740                         <field name="char_encoding" />
2741                         <field name="id" />
2742                         <field name="record" />
2743                         <field name="record_status" />
2744                         <field name="thesaurus" />
2745                 </fields>
2746                 <links>
2747                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2748                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2749                 </links>
2750         </class>
2751         <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">
2752                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2753                         <field name="id" reporter:datatype="id" />
2754                         <field name="bib" reporter:datatype="link" />
2755                         <field name="authority" reporter:datatype="link" />
2756                 </fields>
2757                 <links>
2758                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2759                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2760                 </links>
2761         </class>
2762         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2763                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2764                         <field name="id" reporter:datatype="id" />
2765                         <field name="record" reporter:datatype="link" />
2766                         <field name="atag" reporter:datatype="link" />
2767                         <field name="value" reporter:datatype="text" />
2768                 </fields>
2769                 <links>
2770                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2771                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2772                 </links>
2773         </class>
2774
2775         <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">
2776                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2777                         <field name="id" reporter:datatype="id" />
2778                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2779                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2780                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2781                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2782                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2783                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2784                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2785                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2786                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2787                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2788                 </fields>
2789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2790                         <actions>
2791                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2792                                 <retrieve/>
2793                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2794                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2795                         </actions>
2796                 </permacrud>
2797         </class>
2798
2799         <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">
2800                 <fields oils_persist:primary="code" oils_persist:sequence="">
2801                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2802                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2803                 </fields>
2804                 <links/>
2805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2806             <actions>
2807                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2808                 <retrieve/>
2809                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2810                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2811             </actions>
2812         </permacrud>
2813         </class>
2814         <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">
2815                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2816                         <field name="accepting_usr" />
2817                         <field name="amount" reporter:datatype="money" />
2818                         <field name="amount_collected" reporter:datatype="money" />
2819                         <field name="approval_code" reporter:datatype="text"/>
2820                         <field name="cash_drawer" reporter:datatype="link"/>
2821                         <field name="cc_number" reporter:datatype="text"/>
2822                         <field name="cc_order_number" reporter:datatype="text"/>
2823                         <field name="cc_processor" reporter:datatype="text"/>
2824                         <field name="id" reporter:datatype="id" />
2825                         <field name="note" reporter:datatype="text"/>
2826                         <field name="payment_ts" reporter:datatype="timestamp"/>
2827                         <field name="xact" reporter:datatype="link"/>
2828                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2829                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2830                 </fields>
2831                 <links>
2832                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2833                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2834                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2835                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2836                 </links>
2837         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2838             <actions>
2839                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2840                     <context link="xact" jump="usr" field="home_ou"/>
2841                 </retrieve>
2842                         </actions>
2843                 </permacrud>
2844         </class>
2845         <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">
2846                 <fields oils_persist:primary="name">
2847                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2848                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2849                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2850                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2851                 </fields>
2852                 <links/>
2853         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2854             <actions>
2855                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2856                 <retrieve/>
2857                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2858                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2859             </actions>
2860         </permacrud>
2861         </class>
2862
2863         <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">
2864                 <fields oils_persist:primary="alias">
2865                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2866                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2867                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2868                 </fields>
2869                 <links>
2870                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2871                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2872                 </links>
2873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2874             <actions>
2875                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2876                 <retrieve/>
2877                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2878                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2879             </actions>
2880         </permacrud>
2881         </class>
2882
2883         <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">
2884                 <fields oils_persist:primary="name">
2885                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2886                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2887                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2888                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2889                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2890                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2891                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2892                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2893                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2894                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2895                 </fields>
2896                 <links>
2897                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2898                 </links>
2899         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2900             <actions>
2901                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2902                 <retrieve/>
2903                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2904                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2905             </actions>
2906         </permacrud>
2907         </class>
2908
2909         <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">
2910                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2911                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2912                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2913                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2914                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2915                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2916                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2917                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2918                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2919                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2920                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2921                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2922                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2923                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2924                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2925                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2926                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2927                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2928                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2929                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2930                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link"/>
2931                 </fields>
2932                 <links>
2933                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
2934                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2935                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
2936                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
2937                 </links>
2938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2939             <actions>
2940                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2941                 <retrieve/>
2942                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2943                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2944             </actions>
2945         </permacrud>
2946         </class>
2947
2948         <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">
2949                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
2950                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2951                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
2952                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link"/>
2953                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
2954                 </fields>
2955                 <links>
2956                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
2957                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
2958                 </links>
2959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2960             <actions>
2961                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2962                 <retrieve/>
2963                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2964                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2965             </actions>
2966         </permacrud>
2967         </class>
2968
2969         <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">
2970                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2971                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2972                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2973                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2974                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2975                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2976                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2977                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2978                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2979                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2980                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2981                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2982                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2983                 </fields>
2984                 <links>
2985                 </links>
2986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2987                         <actions>
2988                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2989                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2990                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2991                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2992                         </actions>
2993                 </permacrud>
2994         </class>
2995         <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">
2996                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2997                         <field name="id" reporter:datatype="id" />
2998                         <field name="name" reporter:datatype="text"/>
2999                         <field name="xpath" reporter:datatype="text"/>
3000                         <field name="format" reporter:datatype="link"/>
3001                         <field name="first_word" reporter:datatype="bool" />
3002                 </fields>
3003                 <links/>
3004         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3005             <actions>
3006                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
3007                 <retrieve/>
3008                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
3009                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
3010             </actions>
3011         </permacrud>
3012         </class>
3013         <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">
3014                 <fields oils_persist:primary="code" oils_persist:sequence="">
3015                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3016                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
3017                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3018                 </fields>
3019                 <links/>
3020         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3021             <actions>
3022                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3023                 <retrieve/>
3024                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3025                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3026             </actions>
3027         </permacrud>
3028         </class>
3029         <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">
3030                 <fields oils_persist:primary="code" oils_persist:sequence="">
3031                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3032                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3033                 </fields>
3034                 <links/>
3035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3036             <actions>
3037                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3038                 <retrieve/>
3039                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3040                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3041             </actions>
3042         </permacrud>
3043         </class>
3044     <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">
3045         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3046             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3047             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3048             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3049             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3050         </fields>
3051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3052             <actions>
3053                 <retrieve/>
3054             </actions>
3055         </permacrud>
3056     </class>
3057         <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">
3058                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3059                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3060                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3061                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3062                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3063                 </fields>
3064                 <links>
3065                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3066                 </links>
3067         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3068             <actions>
3069                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3070                 <retrieve/>
3071                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3072                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3073             </actions>
3074         </permacrud>
3075         </class>
3076         <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">
3077                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3078                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3079                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3080                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3081                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3082                 </fields>
3083                 <links>
3084                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3085                 </links>
3086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3087             <actions>
3088                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3089                 <retrieve/>
3090                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3091                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3092             </actions>
3093         </permacrud>
3094         </class>
3095         <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">
3096                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3097                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3098                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3099                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3100                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3101                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3102                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3103                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3104                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3105                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3106                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3107                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3108                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3109                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3110                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3111                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3112                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3113                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3114                 </fields>
3115                 <links>
3116                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3117                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3118                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3119                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3120                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3121                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3122                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3123                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3124                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3125                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3126                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3127                 </links>
3128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3129             <actions>
3130                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3131                 <retrieve/>
3132                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3133                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3134             </actions>
3135         </permacrud>
3136         </class>
3137         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3138                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3139                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3140                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3141                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3142                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3143                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3144                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3145                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3146                 </fields>
3147                 <links>
3148                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3149                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3150         </links>
3151         </class>
3152         <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">
3153                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3154                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3155                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3156                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3157                 </fields>
3158                 <links>
3159                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3160                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3161                 </links>
3162         </class>
3163         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3164                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3165                         <field name="id" reporter:datatype="id" />
3166                         <field name="value" oils_persist:i18n="true" />
3167                 </fields>
3168                 <links/>
3169         </class>
3170         <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">
3171                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3172                         <field name="balance_owed" reporter:datatype="money" />
3173                         <field name="total_owed" reporter:datatype="money" />
3174                         <field name="total_paid" reporter:datatype="money" />
3175                         <field name="usr" reporter:datatype="link"/>
3176                 </fields>
3177                 <links>
3178                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3179         </links>
3180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3181             <actions>
3182                 <retrieve permission="VIEW_USER">
3183                     <context link="usr" field="home_ou"/>
3184                 </retrieve>
3185             </actions>
3186         </permacrud>
3187         </class>
3188         <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">
3189                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3190                         <field name="collector" />
3191                         <field name="enter_time" reporter:datatype="timestamp"/>
3192                         <field name="id" reporter:datatype="id" />
3193                         <field name="location" reporter:datatype="link"/>
3194                         <field name="usr" reporter:datatype="link"/>
3195                 </fields>
3196                 <links>
3197                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3198                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3199                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3200                 </links>
3201         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3202             <actions>
3203                 <create permission="money.collections_tracker.create" context_field="location"/>
3204                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3205                 <delete permission="money.collections_tracker.create" context_field="location"/>
3206             </actions>
3207         </permacrud>
3208         </class>
3209         <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">
3210                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3211                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3212                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3213                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3214                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3215                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3216                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3217                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3218                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3219                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3220                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3221                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3222                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3223                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3224                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3225                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3226                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3227                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3228                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3229                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3230                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3231                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3232                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3233                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3234                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3235                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3236                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3237                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3238                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3239                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3240                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3241                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3242                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3243                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3244                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3245                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3246                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3247                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3248                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3249                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3250                 </fields>
3251                 <links>
3252                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3253                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3254                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3255                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3256                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3257                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3258                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3259                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3260                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3261                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3262                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3263                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3264                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3265                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3266                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3267                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3268                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3269                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3270                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3271                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3272                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3273                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3274                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3275                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3276                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3277                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3278                 </links>
3279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3280             <actions>
3281                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3282                 <retrieve/>
3283                 <update permission="UPDATE_MARC" global_required="true"/>
3284                 <!-- 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. -->
3285                 <delete permission="DELETE_RECORD" global_required="true"/>
3286             </actions>
3287         </permacrud>
3288         </class>
3289         <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">
3290                 <fields oils_persist:primary="id">
3291                         <field name="dow_0_close" />
3292                         <field name="dow_0_open" />
3293                         <field name="dow_1_close" />
3294                         <field name="dow_1_open" />
3295                         <field name="dow_2_close" />
3296                         <field name="dow_2_open" />
3297                         <field name="dow_3_close" />
3298                         <field name="dow_3_open" />
3299                         <field name="dow_4_close" />
3300                         <field name="dow_4_open" />
3301                         <field name="dow_5_close" />
3302                         <field name="dow_5_open" />
3303                         <field name="dow_6_close" />
3304                         <field name="dow_6_open" />
3305                         <field name="id" reporter:datatype="id" />
3306                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3307                 </fields>
3308                 <links>
3309                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3310                 </links>
3311         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3312             <actions>
3313                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3314                 <retrieve/>
3315                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3316                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3317             </actions>
3318         </permacrud>
3319         </class>
3320         <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">
3321                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3322                         <field name="id" reporter:datatype="id" />
3323                         <field name="record" reporter:datatype="link"/>
3324                         <field name="label" reporter:datatype="text"/>
3325                         <field name="label_sortkey" reporter:datatype="text"/>
3326                         <field name="deleted" reporter:datatype="bool"/>
3327                 </fields>
3328                 <links>
3329                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3330                 </links>
3331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3332             <actions>
3333                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3334                 <retrieve/>
3335                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3336                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3337             </actions>
3338         </permacrud>
3339         </class>
3340         <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">
3341                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3342                         <field name="id" reporter:datatype="id" />
3343                         <field name="target_copy" reporter:datatype="link" />
3344                         <field name="part" reporter:datatype="link"/>
3345                 </fields>
3346                 <links>
3347                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3348                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3349                 </links>
3350         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3351             <actions>
3352                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3353                 <retrieve/>
3354                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3355                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3356             </actions>
3357         </permacrud>
3358         </class>
3359     <class  id="aecc"
3360             controller="open-ils.cstore open-ils.pcrud"
3361             oils_obj:fieldmapper="action::emergency_closing_circulation"
3362             oils_persist:tablename="action.emergency_closing_circulation"
3363             reporter:label="Emergency Closing Circulation Entry"
3364             oils_persist:readonly="true"
3365     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3366         <fields oils_persist:primary="id">
3367             <field name="id" reporter:datatype="id" />
3368             <field name="circulation" reporter:datatype="link" />
3369                         <field name="emergency_closing" reporter:datatype="link"/>
3370             <field name="original_due_date" reporter:datatype="timestamp" />
3371             <field name="process_time" reporter:datatype="timestamp" />
3372         </fields>
3373         <links>
3374             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3375             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3376         </links>
3377         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3378             <actions>
3379                 <retrieve/>
3380             </actions>
3381         </permacrud>
3382     </class>
3383     <class  id="aecr"
3384             controller="open-ils.cstore open-ils.pcrud"
3385             oils_obj:fieldmapper="action::emergency_closing_reservation"
3386             oils_persist:tablename="action.emergency_closing_reservation"
3387             reporter:label="Emergency Closing Reservation Entry"
3388             oils_persist:readonly="true"
3389     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3390         <fields oils_persist:primary="id">
3391             <field name="id" reporter:datatype="id" />
3392             <field name="reservation" reporter:datatype="link" />
3393                         <field name="emergency_closing" reporter:datatype="link"/>
3394             <field name="original_end_time" reporter:datatype="timestamp" />
3395             <field name="process_time" reporter:datatype="timestamp" />
3396         </fields>
3397         <links>
3398             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3399             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3400         </links>
3401         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3402             <actions>
3403                 <retrieve/>
3404             </actions>
3405         </permacrud>
3406     </class>
3407     <class  id="aech"
3408             controller="open-ils.cstore open-ils.pcrud"
3409             oils_obj:fieldmapper="action::emergency_closing_hold"
3410             oils_persist:tablename="action.emergency_closing_hold"
3411             reporter:label="Emergency Closing Hold Entry"
3412             oils_persist:readonly="true"
3413     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3414         <fields oils_persist:primary="id">
3415             <field name="id" reporter:datatype="id" />
3416             <field name="hold" reporter:datatype="link" />
3417                         <field name="emergency_closing" reporter:datatype="link"/>
3418             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3419             <field name="process_time" reporter:datatype="timestamp" />
3420         </fields>
3421         <links>
3422             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3423             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3424         </links>
3425         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3426             <actions>
3427                 <retrieve/>
3428             </actions>
3429         </permacrud>
3430     </class>
3431     <class  id="aecs"
3432             controller="open-ils.cstore open-ils.pcrud"
3433             oils_obj:fieldmapper="action::emergency_closing_status"
3434             oils_persist:tablename="action.emergency_closing_status"
3435             reporter:label="Emergency Closing Status"
3436             oils_persist:readonly="true"
3437     >
3438         <fields oils_persist:primary="id">
3439             <field name="id" reporter:datatype="id" />
3440             <field name="creator" reporter:datatype="link" />
3441             <field name="create_time" reporter:datatype="timestamp" />
3442             <field name="process_start_time" reporter:datatype="timestamp" />
3443             <field name="process_end_time" reporter:datatype="timestamp" />
3444             <field name="last_update_time" reporter:datatype="timestamp" />
3445             <field name="circulations" reporter:datatype="int" />
3446             <field name="circulations_complete" reporter:datatype="int" />
3447             <field name="reservations" reporter:datatype="int" />
3448             <field name="reservations_complete" reporter:datatype="int" />
3449             <field name="holds" reporter:datatype="int" />
3450             <field name="holds_complete" reporter:datatype="int" />
3451         </fields>
3452         <links>
3453             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3454         </links>
3455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3456             <actions>
3457                 <retrieve/>
3458             </actions>
3459         </permacrud>
3460     </class>
3461     <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">
3462         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3463             <field name="id" reporter:datatype="id" />
3464             <field name="creator" reporter:datatype="link" />
3465             <field name="create_time" reporter:datatype="timestamp" />
3466             <field name="process_start_time" reporter:datatype="timestamp" />
3467             <field name="process_end_time" reporter:datatype="timestamp" />
3468             <field name="last_update_time" reporter:datatype="timestamp" />
3469             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3470             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3471             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3472             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3473             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3474         </fields>
3475         <links>
3476             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3477             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3478             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3479             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3480             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3481             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3482         </links>
3483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3484             <actions>
3485                 <create permission="EMERGENCY_CLOSING">
3486                     <context link="closing" field="org_unit" />
3487                 </create>
3488                 <retrieve/>
3489                 <update permission="EMERGENCY_CLOSING">
3490                     <context link="closing" field="org_unit" />
3491                 </update>
3492                 <delete permission="EMERGENCY_CLOSING">
3493                     <context link="closing" field="org_unit" />
3494                 </delete>
3495             </actions>
3496         </permacrud>
3497     </class>
3498         <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">
3499                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3500                         <field name="close_end" reporter:datatype="timestamp" />
3501                         <field name="close_start" reporter:datatype="timestamp" />
3502                         <field name="id" reporter:datatype="id" />
3503                         <field name="org_unit" reporter:datatype="org_unit"/>
3504                         <field name="reason" reporter:datatype="text"/>
3505                         <field name="full_day" reporter:datatype="bool"/>
3506                         <field name="multi_day" reporter:datatype="bool"/>
3507                         <field name="emergency_closing" reporter:datatype="link"/>
3508                 </fields>
3509                 <links>
3510                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3511                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3512                 </links>
3513         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3514             <actions>
3515                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3516                 <retrieve/>
3517                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3518                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3519             </actions>
3520         </permacrud>
3521         </class>
3522         <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">
3523                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3524                         <field name="extended" reporter:datatype="interval"/>
3525                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3526                         <field name="max_renewals" reporter:datatype="int" />
3527                         <field name="name" reporter:datatype="text"/>
3528                         <field name="normal" reporter:datatype="interval"/>
3529                         <field name="shrt" reporter:datatype="interval"/>
3530                         <field name="max_auto_renewals" reporter:datatype="int" />
3531                 </fields>
3532                 <links>
3533                 </links>
3534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3535             <actions>
3536                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3537                 <retrieve/>
3538                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3539                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3540             </actions>
3541         </permacrud>
3542         </class>
3543
3544         <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">
3545                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3546                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3547                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3548             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3549                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3550             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3551                 </fields>
3552                 <links>
3553             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3554                 </links>
3555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3556             <actions>
3557                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3558                 <retrieve/>
3559                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3560                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3561             </actions>
3562                 </permacrud>
3563         </class>
3564
3565         <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">
3566                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3567                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3568                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3569                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3570             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3571                 </fields>
3572                 <links>
3573                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3574                 </links>
3575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3576             <actions>
3577                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3578                 <retrieve/>
3579                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3580                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3581             </actions>
3582                 </permacrud>
3583         </class>
3584
3585         <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">
3586                 <fields oils_persist:primary="id" oils_persist:sequence="">
3587                         <field name="balance_owed" reporter:datatype="money"/>
3588                         <field name="id" reporter:datatype="id" />
3589                         <field name="last_billing_note" reporter:datatype="text"/>
3590                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3591                         <field name="last_billing_type" reporter:datatype="text"/>
3592                         <field name="last_payment_note" reporter:datatype="text"/>
3593                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3594                         <field name="last_payment_type" reporter:datatype="text"/>
3595                         <field name="total_owed" reporter:datatype="money"/>
3596                         <field name="total_paid" reporter:datatype="money"/>
3597                         <field name="usr" reporter:datatype="link"/>
3598                         <field name="xact_finish" reporter:datatype="timestamp" />
3599                         <field name="xact_start" reporter:datatype="timestamp" />
3600                         <field name="xact_type" reporter:datatype="text"/>
3601                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3602                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3603                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3604                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3605                         <field name="billing_location" reporter:datatype="link"/>
3606                 </fields>
3607                 <links>
3608                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3609                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3610                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3611                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3612                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3613                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3614                 </links>
3615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3616                         <actions>
3617                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3618                                         <context link="usr" field="home_ou" />
3619                                 </retrieve>
3620                         </actions>
3621                 </permacrud>
3622         </class>
3623         <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">
3624                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3625                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3626                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3627                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3628                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3629                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3630                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3631                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3632                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3633                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3634                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3635                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3636                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3637                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3638                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3639                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3640                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3641                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3642                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3643                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3644                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3645                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3646                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3647                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3648                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3649                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3650                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3651                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3652                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3653                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3654                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
3655                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3656                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3657                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3658                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3659                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3660                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3661                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3662                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3663                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3664                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3665                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3666                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3667                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3668                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3669                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3670                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3671                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3672                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3673                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3674                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3675                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3676                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3677                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3678                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3679                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3680                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3681                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3682                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
3683                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3684                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3685                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3686                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3687                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3688                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3689                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3690                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3691                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3692                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3693                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3694                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3695                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3696                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3697                 </fields>
3698                 <links>
3699                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3700                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3701                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3702                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3703                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3704                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3705                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3706                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3707                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3708                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3709                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3710                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
3711                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3712                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3713                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3714                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3715                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3716                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3717                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3718                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3719                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3720                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3721                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3722                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3723                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3724                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3725                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3726                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3727                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3728                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3729                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3730                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3731                 </links>
3732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3733                         <actions>
3734                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
3735                         </actions>
3736                 </permacrud>
3737         </class>
3738         <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">
3739                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3740                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
3741                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3742                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3743                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3744                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3745                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3746                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3747                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3748         </fields>
3749                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3750                         <actions>
3751                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3752                                 <retrieve/>
3753                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3754                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3755                         </actions>
3756                 </permacrud>
3757         </class>
3758         <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">
3759                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3760                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3761                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3762                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3763                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3764         </fields>
3765         <links>
3766                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3767                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3768                 </links>
3769                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3770                         <actions>
3771                                 <retrieve permission="RUN_REPORTS">
3772                                         <context link="usr" field="home_ou" />
3773                                 </retrieve>
3774                         </actions>
3775                 </permacrud>
3776         </class>
3777         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3778                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3779                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3780                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3781                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3782                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3783                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3784                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3785         </fields>
3786         <links>
3787                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3788                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3789                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3790                 </links>
3791                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3792                         <actions>
3793                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3794                                         <context link="usr" field="home_ou" />
3795                                         <context link="ws" field="owning_lib" />
3796                                 </retrieve>
3797                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3798                                         <context link="usr" field="home_ou" />
3799                                         <context link="ws" field="owning_lib" />
3800                                 </create>
3801                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3802                                         <context link="usr" field="home_ou" />
3803                                         <context link="ws" field="owning_lib" />
3804                                 </update>
3805                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3806                                         <context link="usr" field="home_ou" />
3807                                         <context link="ws" field="owning_lib" />
3808                                 </delete>
3809                         </actions>
3810                 </permacrud>
3811         </class>
3812         <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">
3813                 <fields oils_persist:primary="name">
3814                         <field name="name" reporter:datatype="text"/>
3815                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3816                 </fields>
3817                 <links/>
3818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3819                         <actions>
3820                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3821                                 <retrieve/>
3822                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3823                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3824                         </actions>
3825                 </permacrud>
3826         </class>
3827         <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">
3828                 <fields oils_persist:primary="name">
3829                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3830                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3831                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3832                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3833                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3834                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3835                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3836                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3837                 </fields>
3838                 <links>
3839                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3840                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3841                 </links>
3842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3843                         <actions>
3844                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3845                                 <retrieve/>
3846                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3847                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3848                         </actions>
3849                 </permacrud>
3850         </class>
3851         <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">
3852                 <fields oils_persist:primary="name">
3853                         <field name="name" reporter:datatype="text"/>
3854                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3855                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3856                         <field name="datatype" reporter:datatype="text"/>
3857                         <field name="view_perm" reporter:datatype="link"/>
3858                         <field name="update_perm" reporter:datatype="link"/>
3859                         <field name="fm_class" reporter:datatype="text"/>
3860                         <field name="grp" reporter:datatype="link"/>
3861                 </fields>
3862                 <links>
3863                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3864                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3865                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3866                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3867                 </links>
3868                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3869                         <actions>
3870                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3871                                 <retrieve/>
3872                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3873                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3874                         </actions>
3875                 </permacrud>
3876         </class>
3877         <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">
3878                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3879                         <field name="id" />
3880                         <field name="name"  reporter:datatype="text"/>
3881                         <field name="org_unit" reporter:datatype="org_unit"/>
3882                         <field name="value"  reporter:datatype="text"/>
3883                 </fields>
3884                 <links>
3885                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3886                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3887                 </links>
3888         </class>
3889         <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">
3890                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3891                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3892                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3893                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3894                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3895                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3896                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3897                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3898                 </fields>
3899                 <links>
3900                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3901                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3902                 </links>
3903         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3904             <actions>
3905                 <create permission="CREATE_COPY_NOTE">
3906                     <context link="owning_copy" field="circ_lib"/>
3907                 </create>
3908                 <retrieve permission="VIEW_COPY_NOTES">
3909                     <context link="owning_copy" field="circ_lib"/>
3910                 </retrieve>
3911                 <update permission="UPDATE_COPY_NOTE">
3912                     <context link="owning_copy" field="circ_lib"/>
3913                 </update>
3914                 <delete permission="DELETE_COPY_NOTE">
3915                     <context link="owning_copy" field="circ_lib"/>
3916                 </delete>
3917             </actions>
3918         </permacrud>
3919         </class>
3920         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3921                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3922                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3923                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3924                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3925                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3926                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3927                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3928                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3929                 </fields>
3930                 <links>
3931                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3932                 </links>
3933         </class>
3934         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3935                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3936                         <field name="fingerprint"  reporter:datatype="text"/>
3937                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
3938                         <field name="master_record" reporter:datatype="link"/>
3939                         <field name="mods"  reporter:datatype="text"/>
3940                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3941                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3942                 </fields>
3943                 <links>
3944                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3945                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3946                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
3947                 </links>
3948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3949                         <actions>
3950                                 <retrieve/>
3951                         </actions>
3952                 </permacrud>
3953         </class>
3954         <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">
3955                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3956                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3957                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3958                 </fields>
3959                 <links/>
3960         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3961             <actions>
3962                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3963                 <retrieve/>
3964                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3965                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3966             </actions>
3967         </permacrud>
3968         </class>
3969         <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">
3970                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3971                         <field name="code"  reporter:datatype="text"/>
3972                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3973                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3974                 </fields>
3975                 <links/>
3976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3977             <actions>
3978                 <create permission="CREATE_PERM" global_required="true"/>
3979                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3980                 <update permission="UPDATE_PERM" global_required="true"/>
3981                 <delete permission="DELETE_PERM" global_required="true"/>
3982             </actions>
3983         </permacrud>
3984         </class>
3985         <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">
3986                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3987                         <field name="id" reporter:datatype="id" />
3988                         <field name="metarecord" reporter:datatype="link"/>
3989                         <field name="source" reporter:datatype="link"/>
3990                 </fields>
3991                 <links>
3992                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3993                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3994                 </links>
3995                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3996                         <actions>
3997                                 <retrieve/>
3998                         </actions>
3999                 </permacrud>
4000         </class>
4001         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4002                         oils_obj:fieldmapper="metabib::display_entry" 
4003                         oils_persist:tablename="metabib.display_entry" 
4004                         oils_persist:field_safe="true"
4005                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4006                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4007                         <field name="id" reporter:datatype="id" />
4008                         <field name="field" reporter:datatype="link"/>
4009                         <field name="source" reporter:datatype="link"/>
4010                         <field name="value"  reporter:datatype="text"/>
4011                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4012                 </fields>
4013                 <links>
4014                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4015                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4016                 </links>
4017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4018                         <actions>
4019                                 <retrieve/>
4020                         </actions>
4021                 </permacrud>
4022         </class>
4023         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4024                 oils_persist:tablename="metabib.flat_display_entry"
4025                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4026                 oils_persist:field_safe="true"
4027                 reporter:label="Flat Display Entry" 
4028                 oils_persist:readonly="true">
4029                 <fields>
4030                         <field name="source" reporter:datatype="id" />
4031                         <field name="name" reporter:datatype="text"/>
4032                         <field name="multi" reporter:datatype="bool"/>
4033                         <field name="label" reporter:datatype="text"/>
4034                         <field name="field" reporter:datatype="link"/>
4035                         <field name="value" reporter:datatype="text"/>
4036                 </fields>
4037                 <links>
4038                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4039                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4040                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4041                 </links>
4042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4043                         <actions>
4044                                 <retrieve/>
4045                         </actions>
4046                 </permacrud>
4047         </class>
4048         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4049                 oils_persist:tablename="metabib.compressed_display_entry"
4050                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4051                 oils_persist:field_safe="true"
4052                 reporter:label="Compressed Display Entry" 
4053                 oils_persist:readonly="true">
4054                 <fields>
4055                         <field name="source" reporter:datatype="id" />
4056                         <field name="name" reporter:datatype="text"/>
4057                         <field name="multi" reporter:datatype="bool"/>
4058                         <field name="label" reporter:datatype="text"/>
4059                         <field name="field" reporter:datatype="link"/>
4060                         <field name="value" reporter:datatype="text"/>
4061                 </fields>
4062                 <links>
4063                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4064                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4065                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4066                 </links>
4067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4068                         <actions>
4069                                 <retrieve/>
4070                         </actions>
4071                 </permacrud>
4072         </class>
4073         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4074                 oils_persist:tablename="metabib.wide_display_entry"
4075                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4076                 oils_persist:field_safe="true"
4077                 reporter:label="Wide Display Entry" 
4078                 oils_persist:readonly="true">
4079                 <fields oils_persist:primary="source">
4080                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4081                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4082                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4083                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4084                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4085                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4086                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4087                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4088                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4089                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4090                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4091                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4092                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4093                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4094                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4095                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4096                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4097                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4098                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4099                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4100                 </fields>
4101                 <links>
4102                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4103                 </links>
4104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4105                         <actions>
4106                                 <retrieve/>
4107                         </actions>
4108                 </permacrud>
4109         </class>
4110
4111         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4112                 oils_persist:tablename="config.display_field_map"
4113                 oils_obj:fieldmapper="config::display_field_map"
4114                 oils_persist:field_safe="true"
4115                 reporter:label="Display Field Map">
4116                 <fields oils_persist:primary="name">
4117                         <field name="name" reporter:datatype="text"/>
4118                         <field name="field" reporter:datatype="link"/>
4119                         <field name="multi" reporter:datatype="bool"/>
4120                 </fields>
4121                 <links>
4122                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4123                 </links>
4124                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4125                         <actions>
4126                                 <retrieve/>
4127                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4128                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4129                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4130                         </actions>
4131                 </permacrud>
4132         </class>
4133
4134         <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">
4135                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4136                         <field name="id" reporter:datatype="id" />
4137                         <field name="field" reporter:datatype="link"/>
4138                         <field name="source" reporter:datatype="link"/>
4139                         <field name="value"  reporter:datatype="text"/>
4140                 </fields>
4141                 <links>
4142                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4143                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4144                 </links>
4145         </class>
4146         <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">
4147                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4148                         <field name="id" reporter:datatype="id" />
4149                         <field name="value" reporter:datatype="text"/>
4150                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4151                 </fields>
4152                 <links>
4153                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4154                 </links>
4155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4156                         <actions>
4157                                 <retrieve/>
4158                         </actions>
4159                 </permacrud>
4160         </class>
4161         <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">
4162                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4163                         <field name="id" reporter:datatype="id" />
4164                         <field name="entry" reporter:datatype="link"/>
4165                         <field name="def" reporter:datatype="link"/>
4166                         <field name="source" reporter:datatype="link"/>
4167                 </fields>
4168                 <links>
4169                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4170                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4171                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4172                 </links>
4173         </class>
4174         <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">
4175                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4176                         <field name="id" reporter:datatype="id" />
4177                         <field name="entry" reporter:datatype="link"/>
4178                         <field name="simple_heading" reporter:datatype="link"/>
4179                 </fields>
4180                 <links>
4181                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4182                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4183                 </links>
4184         </class>
4185         <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">
4186                 <oils_persist:source_definition><![CDATA[
4187                         SELECT * FROM metabib.author_field_entry
4188                                                 UNION ALL
4189                         SELECT * FROM metabib.keyword_field_entry
4190                                                 UNION ALL
4191                         SELECT * FROM metabib.identifier_field_entry
4192                                                 UNION ALL
4193                         SELECT * FROM metabib.title_field_entry
4194                                                 UNION ALL
4195                         SELECT * FROM metabib.subject_field_entry
4196                                                 UNION ALL
4197                         SELECT * FROM metabib.series_field_entry
4198                 ]]></oils_persist:source_definition>
4199                 <fields>
4200                         <field name="field" reporter:datatype="link"/>
4201                         <field name="id" reporter:datatype="id" />
4202                         <field name="source" reporter:datatype="link"/>
4203                         <field name="value"  reporter:datatype="text"/>
4204                 </fields>
4205                 <links>
4206                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4207                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4208                 </links>
4209         </class>
4210         <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">
4211                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4212                         <field name="field" reporter:datatype="link"/>
4213                         <field name="id" reporter:datatype="id" />
4214                         <field name="source" reporter:datatype="link"/>
4215                         <field name="value"  reporter:datatype="text"/>
4216                 </fields>
4217                 <links>
4218                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4219                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4220                 </links>
4221         </class>
4222         <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">
4223                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4224                         <field name="accepting_usr" reporter:datatype="link"/>
4225                         <field name="amount" reporter:datatype="money" />
4226                         <field name="amount_collected" reporter:datatype="money" />
4227                         <field name="cash_drawer" reporter:datatype="link"/>
4228                         <field name="id" reporter:datatype="id" />
4229                         <field name="note"  reporter:datatype="text"/>
4230                         <field name="payment_ts" reporter:datatype="timestamp"/>
4231                         <field name="xact" reporter:datatype="link"/>
4232                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4233                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4234                 </fields>
4235                 <links>
4236                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4237                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4238                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4239                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4240                 </links>
4241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4242             <actions>
4243                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4244                     <context link="xact" jump="usr" field="home_ou"/>
4245                 </retrieve>
4246                         </actions>
4247                 </permacrud>
4248         </class>
4249         <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">
4250                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4251                         <field name="accepting_usr" reporter:datatype="link"/>
4252                         <field name="amount" reporter:datatype="money" />
4253                         <field name="amount_collected" reporter:datatype="money" />
4254                         <field name="id" reporter:datatype="id" />
4255                         <field name="note"  reporter:datatype="text"/>
4256                         <field name="payment_ts" reporter:datatype="timestamp"/>
4257                         <field name="xact" reporter:datatype="link"/>
4258                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4259                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4260                 </fields>
4261                 <links>
4262                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4263                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4264                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4265                 </links>
4266         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4267             <actions>
4268                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4269                     <context link="xact" jump="usr" field="home_ou"/>
4270                 </retrieve>
4271                         </actions>
4272                 </permacrud>
4273         </class>
4274         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4275                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4276                         <field name="accepting_usr" reporter:datatype="link"/>
4277                         <field name="amount" reporter:datatype="money" />
4278                         <field name="amount_collected" reporter:datatype="money" />
4279                         <field name="id" reporter:datatype="id" />
4280                         <field name="note"  reporter:datatype="text"/>
4281                         <field name="payment_ts" reporter:datatype="timestamp"/>
4282                         <field name="xact" reporter:datatype="link"/>
4283                         <field name="billing" reporter:datatype="link"/>
4284                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4285                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4286                 </fields>
4287                 <links>
4288                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4289                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4290                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4291                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4292                 </links>
4293         </class>
4294         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4295                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4296                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4297                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4298                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4299                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4300                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4301                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4302                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4303                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4304                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4305                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4306                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4307                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4308                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4309                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4310                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4311                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4312                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4313                 </fields>
4314                 <links>
4315                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4316                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4317                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4318                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4319                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4320                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4321                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4322                 </links>
4323         </class>
4324
4325         <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">
4326                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4327                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4328                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4329                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4330                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4331                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4332                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4333                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4334                 </fields>
4335                 <links/>
4336         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4337             <actions>
4338                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4339                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4340                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4341                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4342             </actions>
4343         </permacrud>
4344         </class>
4345         <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">
4346                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4347                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4348                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4349                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4350                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4351                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4352                 </fields>
4353                 <links>
4354                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4355                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4356                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4357         </links>
4358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4359             <actions>
4360                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4361                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4362                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4363                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4364             </actions>
4365         </permacrud>
4366         </class>
4367         <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">
4368                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4369                         <field name="holdable" reporter:datatype="bool"/>
4370                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4371                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4372                         <field name="opac_visible" reporter:datatype="bool"/>
4373             <field name="copy_active" reporter:datatype="bool"/>
4374             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4375             <field name="is_available" reporter:datatype="bool"/>
4376             <field name="hopeless_prone" reporter:datatype="bool"/>
4377                 </fields>
4378                 <links/>
4379         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4380             <actions>
4381                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4382                 <retrieve/>
4383                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4384                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4385             </actions>
4386         </permacrud>
4387         </class>
4388         <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">
4389                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4390                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4391                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4392                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4393                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4394                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4395                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4396                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4397                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4398                 </fields>
4399                 <links>
4400                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4401                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4402                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4403                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4404                 </links>
4405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4406                         <actions>
4407                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4408                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4409                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4410                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4411                         </actions>
4412                 </permacrud>
4413         </class>
4414         <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">
4415                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4416                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4417                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4418                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4419                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4420                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4421                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4422                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4423                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4424                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4425                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4426                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4427                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4428                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4429                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4430                 </fields>
4431                 <links>
4432                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4433                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4434                 </links>
4435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4436                         <actions>
4437                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4438                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4439                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4440                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4441                         </actions>
4442                 </permacrud>
4443         </class>
4444         <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">
4445                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4446                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4447                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4448                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4449                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4450                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4451                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4452                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4453                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4454                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4455                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4456                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4457                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4458                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4459                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4460                 </fields>
4461                 <links>
4462                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4463                 </links>
4464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4465                         <actions>
4466                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4467                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4468                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4469                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4470                         </actions>
4471                 </permacrud>
4472         </class>
4473
4474
4475         <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">
4476                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4477                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4478                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4479                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4480                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4481                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4482                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4483                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4484                 </fields>
4485                 <links>
4486                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4487                 </links>
4488         </class>
4489
4490         <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">
4491                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4492                         <field name="call_number" />
4493                         <field name="create_date" reporter:datatype="timestamp"/>
4494                         <field name="creator" reporter:datatype="link"/>
4495                         <field name="id" reporter:datatype="id" />
4496                         <field name="pub" reporter:datatype="bool"/>
4497                         <field name="title"  reporter:datatype="text"/>
4498                         <field name="value"  reporter:datatype="text"/>
4499                 </fields>
4500                 <links>
4501                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4502                 </links>
4503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4504             <actions>
4505                 <create permission="CREATE_VOLUME_NOTE">
4506                     <context link="call_number" field="owning_lib"/>
4507                 </create>
4508                 <retrieve permission="VIEW_VOLUME_NOTES">
4509                     <context link="call_number" field="owning_lib"/>
4510                 </retrieve>
4511                 <update permission="UPDATE_VOLUME_NOTE">
4512                     <context link="call_number" field="owning_lib"/>
4513                 </update>
4514                 <delete permission="DELETE_VOLUME_NOTE">
4515                     <context link="call_number" field="owning_lib"/>
4516                 </delete>
4517             </actions>
4518         </permacrud>
4519         </class>
4520         <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">
4521                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4522                         <field name="create_date" reporter:datatype="timestamp"/>
4523                         <field name="creator" reporter:datatype="link"/>
4524                         <field name="edit_date" reporter:datatype="timestamp"/>
4525                         <field name="editor" reporter:datatype="link"/>
4526                         <field name="id" reporter:datatype="id" />
4527                         <field name="record" reporter:datatype="link"/>
4528                         <field name="value" reporter:datatype="text"/>
4529                 </fields>
4530                 <links>
4531                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4532                 </links>
4533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4534             <actions>
4535                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4536                 <retrieve/>
4537                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4538                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4539             </actions>
4540         </permacrud>
4541         </class>
4542         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4543         <oils_persist:source_definition><![CDATA[
4544 SELECT  usr,
4545         SUM(
4546             CASE
4547                 WHEN (
4548                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4549                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4550                 ) THEN 1
4551                 ELSE 0
4552             END
4553         ) AS out,
4554
4555         SUM(
4556             CASE
4557                 WHEN (
4558                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4559                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4560                 ) THEN 1
4561                 ELSE 0
4562             END
4563         ) AS overdue,
4564
4565         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4566         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4567         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4568   FROM  action.circulation
4569   WHERE checkin_time IS NULL
4570   GROUP BY 1
4571         ]]></oils_persist:source_definition>
4572         <fields oils_persist:primary="usr">
4573             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4574             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4575             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4576             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4577             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4578             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4579         </fields>
4580         <links>
4581             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4582         </links>
4583         </class>
4584         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4585         <oils_persist:source_definition><![CDATA[
4586 SELECT  usr,
4587         STRING_AGG(
4588             CASE
4589                 WHEN (
4590                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4591                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4592                 ) THEN id::TEXT
4593                 ELSE '0'
4594             END
4595         ,',') AS out,
4596
4597         STRING_AGG(
4598             CASE
4599                 WHEN (
4600                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4601                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4602                 ) THEN id::TEXT
4603                 ELSE '0'
4604             END
4605         ,',') AS overdue,
4606
4607         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4608         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4609         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4610   FROM  action.circulation
4611   WHERE checkin_time IS NULL
4612   GROUP BY 1
4613         ]]></oils_persist:source_definition>
4614         <fields oils_persist:primary="usr">
4615             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4616             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4617             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4618             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4619             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4620             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4621         </fields>
4622         <links>
4623             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4624         </links>
4625         </class>
4626         <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">
4627                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4628                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4629                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4630                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4631                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4632                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4633                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4634                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4635                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4636                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4637                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4638                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4639                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4640                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4641                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4642                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4643                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4644                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4645                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4646                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4647                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4648                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4649                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4650                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4651                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4652                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4653                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4654                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4655                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4656                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4657                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4658                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4659                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4660                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4661                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4662                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4663                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4664                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4665                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4666                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4667                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4668                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4669                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4670                 </fields>
4671                 <links>
4672                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4673                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4674                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4675                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4676                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4677                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4678                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4679                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4680                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4681                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4682                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4683                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4684                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4685                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4686                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4687                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4688                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4689                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4690                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4691                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4692                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4693                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4694                 </links>
4695                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4696                         <actions>
4697                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4698                         </actions>
4699                 </permacrud>
4700         </class>
4701         <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">
4702                 <fields>
4703                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4704                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4705                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4706                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4707                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4708                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4709                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4710                 </fields>
4711                 <links>
4712                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4713                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4714                 </links>
4715                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4716                         <actions>
4717                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4718                         </actions>
4719                 </permacrud>
4720         </class>
4721         <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">
4722                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4723                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4724                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4725                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4726                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4727                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4728                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4729                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4730                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4731                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4732                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4733                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4734                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4735                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4736                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4737                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4738                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4739                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4740                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4741                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4742                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4743                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4744                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4745                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4746                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4747                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4748                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4749                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4750                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4751                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4752                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4753                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4754                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4755                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4756                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4757                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4758                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4759                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4760                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4761                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4762                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4763                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4764                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4765                 </fields>
4766                 <links>
4767                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4768                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4769                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4770                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4771                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4772                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4773                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4774                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4775                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4776                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4777                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4778                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4779                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4780                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4781                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4782                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4783                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4784                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4785                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4786                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4787                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4788                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4789                 </links>
4790                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4791                         <actions>
4792                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4793                         </actions>
4794                 </permacrud>
4795         </class>
4796
4797         <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">
4798                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4799                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4800                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4801                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4802                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4803                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4804                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4805                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4806                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4807                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4808                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4809                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4810                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4811                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4812                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4813                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4814                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4815                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4816                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4817                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4818                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4819                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4820                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4821                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4822                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4823                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4824                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4825                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4826                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4827                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4828                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4829                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4830                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4831                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4832                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4833                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4834                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4835                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4836                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4837                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4838                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4839                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4840                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4841                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4842                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4843                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4844                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4845                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4846                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4847                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4848                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4849                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4850                 </fields>
4851                 <links>
4852                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4853                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4854                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4855                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4856                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4857                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4858                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4859                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4860                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4861                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4862                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4863                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4864                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4865                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4866                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4867                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4868                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4869                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4870                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4871                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4872                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4873                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4874                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4875                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4876                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4877                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4878                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4879                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4880                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4881                 </links>
4882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4883                         <actions>
4884                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4885                         </actions>
4886                 </permacrud>
4887         </class>
4888         <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">
4889                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4890                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4891                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4892                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4893                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4894                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4895                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4896                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4897                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4898                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4899                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4900                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4901                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4902                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4903                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4904                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4905                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4906                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4907                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4908                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4909                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4910                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4911                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4912                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4913                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4914                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4915                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4916                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4917                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4918                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4919                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4920                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4921                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4922                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4923                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4924                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4925                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4926                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4927                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4928                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4929                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4930                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4931                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4932                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4933                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4934                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4935                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4936                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4937                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4938                 </fields>
4939                 <links>
4940                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4941                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4942                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4943                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4944                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4945                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4946                         <link field="payments" reltype="has_many" key="xact" map="" class="map"/>
4947                         <link field="billings" reltype="has_many" key="xact" map="" class="mab"/>
4948                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4949                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4950                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4951                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4952                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4953                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4954                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4955                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4956                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4957                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4958                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4959                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4960                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4961                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4962                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4963                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4964                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4965                 </links>
4966         </class>
4967         <class id="auch" 
4968                 controller="open-ils.cstore" 
4969                 oils_obj:fieldmapper="action::user_circ_history" 
4970                 oils_persist:tablename="action.usr_circ_history" 
4971                 reporter:label="User Checkout History">
4972                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4973                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4974                         <!-- prevent reporting on the user that owns the checkout history -->
4975                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4976                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4977                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4978                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4979                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4980                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4981                 </fields>
4982                 <links>
4983                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4984                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4985                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4986                 </links>
4987         </class>
4988         <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">
4989                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4990                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4991                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
4992                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4993                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4994                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4995                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4996                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4997                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4998                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4999                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
5000                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5001                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5002                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5003                 </fields>
5004                 <links>
5005                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5006                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5007                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5008                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5009                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5010                 </links>
5011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5012                         <actions>
5013                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5014                                 <retrieve/>
5015                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5016                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5017                         </actions>
5018                 </permacrud>
5019         </class>
5020
5021         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5022                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5023                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5024                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5025                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5026                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5027                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5028                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5029                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5030                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5031                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5032                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5033                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5034                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5035                 </fields>
5036                 <links>
5037                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5038                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5039                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5040                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5041                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5042                 </links>
5043                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5044                         <actions>
5045                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5046                                 <retrieve/>
5047                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5048                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5049                         </actions>
5050                 </permacrud>
5051         </class>
5052         
5053         <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">
5054                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5055                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5056                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5057                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5058                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5059                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5060                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5061                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5062                 </fields>
5063                 <links>
5064                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5065                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5066                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5067                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5068                 </links>
5069                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5070                         <actions>
5071                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5072                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5073                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5074                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5075                         </actions>
5076                 </permacrud>
5077         </class>
5078         
5079         <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">
5080                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5081                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5082                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5083                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5084                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5085                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5086                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5087                 </fields>
5088                 <links>
5089                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5090                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5091                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5092                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5093                 </links>
5094                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5095                         <actions>
5096                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5097                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5098                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5099                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5100                         </actions>
5101                 </permacrud>
5102         </class>
5103         
5104         <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">
5105                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5106                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5107                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5108                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5109                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5110                 </fields>
5111                 <links>
5112                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5113                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5114                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5115                 </links>
5116                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5117                         <actions>
5118                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5119                     <context link="resource" field="owner" />
5120                 </create>
5121                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5122                     <context link="resource" field="owner" />
5123                 </retrieve>
5124                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5125                     <context link="resource" field="owner" />
5126                 </update>
5127                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5128                     <context link="resource" field="owner" />
5129                 </delete>
5130                         </actions>
5131                 </permacrud>
5132         </class>
5133         
5134         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5135                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5136                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5137                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5138                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5139                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5140                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5141                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5142                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5143                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5144                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5145                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5146                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5147                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5148                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5149                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5150                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5151                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5152                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5153                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5154                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5155                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5156                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5157                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5158                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5159                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5160                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5161                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5162                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5163                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5164                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5165                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5166                 </fields>
5167                 <links>
5168                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5169                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5170                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5171                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5172                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5173                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5174                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5175                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5176                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5177                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5178                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5179                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5180                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5181                 </links>
5182                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5183                         <actions>
5184                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5185                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5186                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5187                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5188                         </actions>
5189                 </permacrud>
5190         </class>
5191         
5192         <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">
5193                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5194                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5195                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5196                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5197                 </fields>
5198                 <links>
5199                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5200                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5201                 </links>
5202                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5203                         <actions>
5204                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5205                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5206                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5207                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5208                         </actions>
5209                 </permacrud>
5210         </class>
5211
5212         <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">
5213                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5214                         <field name="bucket" reporter:datatype="link"/>
5215                         <field name="id" reporter:datatype="id" />
5216                         <field name="target_call_number" reporter:datatype="link" />
5217                         <field name="create_time" reporter:datatype="timestamp" />
5218                         <field name="pos" reporter:datatype="int" />
5219                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5220                 </fields>
5221                 <links>
5222                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5223                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5224             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5225                 </links>
5226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5227                         <actions>
5228                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5229                     <context link="bucket" owning_lib="owning_lib"/>
5230                 </retrieve>
5231             </actions>
5232         </permacrud>
5233         </class>
5234         <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">
5235                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5236                         <field name="id" reporter:datatype="id" />
5237                         <field name="item" reporter:datatype="link"/>
5238                         <field name="note" reporter:datatype="text" />
5239                 </fields>
5240                 <links>
5241                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5242                 </links>
5243         </class>
5244         <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">
5245                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5246                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5247                         <field name="btype" reporter:datatype="text"/>
5248                         <field name="id" reporter:datatype="id" />
5249                         <field name="name" reporter:datatype="text"/>
5250                         <field name="description" reporter:datatype="text"/>
5251                         <field name="owner" reporter:datatype="link"/>
5252                         <field name="pub" reporter:datatype="bool"/>
5253                         <field name="create_time" reporter:datatype="timestamp" />
5254                         <field name="owning_lib" reporter:datatype="org_unit" />
5255                 </fields>
5256                 <links>
5257                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5258                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5259                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5260                 </links>
5261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5262                         <actions>
5263                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5264                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5265                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5266                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5267                         </actions>
5268                 </permacrud>
5269         </class>
5270         <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">
5271                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5272                         <field name="id" reporter:datatype="id" />
5273                         <field name="bucket" reporter:datatype="link"/>
5274                         <field name="note" reporter:datatype="text" />
5275                 </fields>
5276                 <links>
5277                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5278                 </links>
5279         </class>
5280         <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">
5281                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5282                         <field name="hold" reporter:datatype="link"/>
5283                         <field name="id" reporter:datatype="id" />
5284                         <field name="target_copy" reporter:datatype="link"/>
5285                         <field name="proximity" reporter:datatype="number"/>
5286                 </fields>
5287                 <links>
5288                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5289                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5290                 </links>
5291         </class>
5292         <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">
5293                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5294                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5295                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5296                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5297                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5298                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5299                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5300                 </fields>
5301                 <links>
5302                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5303                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5304                 </links>
5305         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5306             <actions>
5307                 <create permission="CREATE_HOLD_NOTIFICATION">
5308                                         <context link="hold" jump="usr" field="home_ou" />
5309                                 </create>
5310                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5311                                         <context link="hold" jump="usr" field="home_ou" />
5312                                 </retrieve>
5313                 <update permission="CREATE_HOLD_NOTIFICATION">
5314                                         <context link="hold" jump="usr" field="home_ou" />
5315                                 </update>
5316                 <delete permission="CREATE_HOLD_NOTIFICATION">
5317                                         <context link="hold" jump="usr" field="home_ou" />
5318                                 </delete>
5319             </actions>
5320         </permacrud>
5321         </class>
5322         <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">
5323                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5324                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5325                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5326                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5327                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5328                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5329                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5330                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5331                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5332                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5333                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5334                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5335                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5336                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5337                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5338                 </fields>
5339                 <links>
5340                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5341                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5342                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5343                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5344                 </links>
5345         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5346             <actions>
5347                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5348                 <retrieve/>
5349                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5350                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5351             </actions>
5352         </permacrud>
5353         </class>
5354         <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">
5355                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5356                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5357                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5358                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5359                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5360             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5361             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5362             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5363                 </fields>
5364                 <links>
5365                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5366                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5367                 </links>
5368         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5369             <actions>
5370                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5371                 <retrieve/>
5372                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5373                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5374             </actions>
5375         </permacrud>
5376         </class>
5377         <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">
5378                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5379                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5380             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5381             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5382                 </fields>
5383                 <links>
5384                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5385                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5386                 </links>
5387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5388             <actions>
5389                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5390                                         <context link="lgroup" field="owner" />
5391                 </create>
5392                 <retrieve/>
5393                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5394                                         <context link="lgroup" field="owner" />
5395                 </update>
5396                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5397                                         <context link="lgroup" field="owner" />
5398                 </delete>
5399             </actions>
5400         </permacrud>
5401         </class>
5402
5403     <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">
5404         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5405             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5406             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5407             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5408             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5409         </fields>
5410         <links>
5411             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5412             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5413         </links>
5414         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5415             <actions>
5416                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5417                 <retrieve/>
5418                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5419                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5420             </actions>
5421         </permacrud>
5422     </class>
5423
5424         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5425                 <fields>
5426                         <field name="sre_id" oils_persist:virtual="true" />
5427                         <field name="location" oils_persist:virtual="true" />
5428                         <field name="owning_lib" oils_persist:virtual="true" />
5429                         <field name="basic_holdings" oils_persist:virtual="true" />
5430                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5431                         <field name="supplement_holdings" oils_persist:virtual="true" />
5432                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5433                         <field name="index_holdings" oils_persist:virtual="true" />
5434                         <field name="index_holdings_add" oils_persist:virtual="true" />
5435                         <field name="online" oils_persist:virtual="true" />
5436                         <field name="missing" oils_persist:virtual="true" />
5437                         <field name="incomplete" oils_persist:virtual="true" />
5438                 </fields>
5439         </class>
5440
5441         <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">
5442                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5443                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5444                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5445                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5446                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5447                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5448                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5449                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5450                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5451                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5452                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5453                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5454                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5455                 </fields>
5456                 <links>
5457                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5458                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5459                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5460                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5461                 </links>
5462                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5463                         <actions>
5464                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5465                                 <retrieve/>
5466                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5467                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5468                         </actions>
5469                 </permacrud>
5470         </class>
5471
5472         <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">
5473                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5474                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5475                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5476                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5477                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5478                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5479                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5480                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5481                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5482                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5483                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5484                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5485                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5486                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5487                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5488                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5489                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5490                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5491                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5492                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5493                 </fields>
5494                 <links>
5495                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5496                 </links>
5497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5498                         <actions>
5499                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5500                                         <context link="subscription" field="owning_lib" />
5501                                 </create>
5502                                 <retrieve />
5503                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5504                                         <context link="subscription" field="owning_lib" />
5505                                 </update>
5506                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5507                                         <context link="subscription" field="owning_lib" />
5508                                 </delete>
5509                         </actions>
5510                 </permacrud>
5511         </class>
5512
5513         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5514                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5515                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5516                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5517                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5518                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5519                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5520                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5521                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5522                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5523                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5524                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5525                 </fields>
5526                 <links>
5527                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5528                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5529                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5530                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5531                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5532                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5533                 </links>
5534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5535                         <actions>
5536                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5537                                 <retrieve />
5538                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5539                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5540                         </actions>
5541                 </permacrud>
5542         </class>
5543
5544         <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">
5545                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5546                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5547                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5548                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5549                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5550                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5551                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5552                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5553                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5554                 </fields>
5555                 <links>
5556                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5557                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5558                 </links>
5559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5560                         <actions>
5561                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5562                     <context link="subscription" field="owning_lib"/>
5563                 </create>
5564                                 <retrieve />
5565                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5566                     <context link="subscription" field="owning_lib"/>
5567                 </update>
5568                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5569                     <context link="subscription" field="owning_lib"/>
5570                 </delete>
5571                         </actions>
5572                 </permacrud>
5573         </class>
5574
5575         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5576                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5577                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5578                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5579                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5580                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5581                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5582                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5583                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5584                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5585                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5586                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5587                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5588                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5589                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5590                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5591                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5592                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5593                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5594                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5595                 </fields>
5596                 <links>
5597                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5598                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5599                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5600                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5601                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5602                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5603                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5604                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5605                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5606                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5607                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5608                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5609                 </links>
5610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5611                         <actions>
5612                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5613                                 <retrieve />
5614                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5615                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5616                         </actions>
5617                 </permacrud>
5618         </class>
5619
5620         <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">
5621                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5622                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5623                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5624                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5625                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5626                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5627                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5628                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5629                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5630                 </fields>
5631                 <links>
5632                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5633                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5634                 </links>
5635                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5636                         <actions>
5637                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5638                                         <context link="distribution" field="holding_lib" />
5639                                 </create>
5640                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5641                                         <context link="distribution" field="holding_lib" />
5642                                 </retrieve>
5643                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5644                                         <context link="distribution" field="holding_lib" />
5645                                 </update>
5646                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5647                                         <context link="distribution" field="holding_lib" />
5648                                 </delete>
5649                         </actions>
5650                 </permacrud>
5651         </class>
5652
5653         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5654                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5655                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5656                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5657                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5658                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5659                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5660                 </fields>
5661                 <links>
5662                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5663                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5664                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5665                 </links>
5666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5667                         <actions>
5668                                 <create permission="ADMIN_SERIAL_STREAM">
5669                                         <context link="distribution" field="holding_lib" />
5670                                 </create>
5671                                 <retrieve />
5672                                 <update permission="ADMIN_SERIAL_STREAM">
5673                                         <context link="distribution" field="holding_lib" />
5674                                 </update>
5675                                 <delete permission="ADMIN_SERIAL_STREAM">
5676                                         <context link="distribution" field="holding_lib" />
5677                                 </delete>
5678                         </actions>
5679                 </permacrud>
5680         </class>
5681
5682         <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">
5683                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5684                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5685                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5686                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5687                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5688                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5689                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5690                 </fields>
5691                 <links>
5692                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5693                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5694                 </links>
5695                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5696                         <actions>
5697                                 <create permission="ADMIN_SERIAL_STREAM">
5698                                         <context link="stream" jump="distribution" field="holding_lib" />
5699                                 </create>
5700                                 <retrieve permission="RECEIVE_SERIAL">
5701                                         <context link="stream" jump="distribution" field="holding_lib" />
5702                                 </retrieve>
5703                                 <update permission="ADMIN_SERIAL_STREAM">
5704                                         <context link="stream" jump="distribution" field="holding_lib" />
5705                                 </update>
5706                                 <delete permission="ADMIN_SERIAL_STREAM">
5707                                         <context link="stream" jump="distribution" field="holding_lib" />
5708                                 </delete>
5709                         </actions>
5710                 </permacrud>
5711         </class>
5712
5713         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5714                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5715                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5716                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5717                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5718                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5719                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5720                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5721                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5722                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5723                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5724                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5725                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5726                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5727                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5728                 </fields>
5729                 <links>
5730                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5731                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5732                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5733                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5734                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5735                 </links>
5736                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5737                         <actions>
5738                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5739                                         <context link="subscription" field="owning_lib" />
5740                                 </create>
5741                                 <retrieve/>
5742                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5743                                         <context link="subscription" field="owning_lib" />
5744                                 </update>
5745                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5746                                         <context link="subscription" field="owning_lib" />
5747                                 </delete>
5748                         </actions>
5749                 </permacrud>
5750         </class>
5751
5752         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5753                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5754                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5755                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5756                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5757                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5758                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5759                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5760                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5761                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5762                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5763                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5764                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5765                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5766                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5767                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5768                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5769                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5770                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5771                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5772                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5773                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5774                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5775                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5776                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5777                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5778                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5779                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5780                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5781                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5782                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5783                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5784                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5785                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5786                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5787                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5788                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5789                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5790                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5791                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5792                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5793                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5794                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5795                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5796                 </fields>
5797                 <links>
5798                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5799                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5800                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5801                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5802                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5803                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5804                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5805                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5806                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5807                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5808                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5809                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5810                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5811                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5812                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5813                 </links>
5814                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5815                         <actions>
5816                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5817                                 <retrieve/>
5818                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5819                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5820                         </actions>
5821                 </permacrud>
5822         </class>
5823
5824         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5825                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5826                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5827                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5828                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5829                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5830                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5831                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5832                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5833                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5834                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5835                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5836                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5837                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5838                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5839                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5840                 </fields>
5841                 <links>
5842                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5843                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5844                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5845                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5846                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5847                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5848                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5849                 </links>
5850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5851                         <actions>
5852                                 <create permission="ADMIN_SERIAL_ITEM">
5853                                         <context link="stream" jump="distribution" field="holding_lib" />
5854                                 </create>
5855                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5856                                         <context link="stream" jump="distribution" field="holding_lib" />
5857                                 </retrieve>
5858                                 <update permission="ADMIN_SERIAL_ITEM">
5859                                         <context link="stream" jump="distribution" field="holding_lib" />
5860                                 </update>
5861                                 <delete permission="ADMIN_SERIAL_ITEM">
5862                                         <context link="stream" jump="distribution" field="holding_lib" />
5863                                 </delete>
5864                         </actions>
5865                 </permacrud>
5866         </class>
5867
5868         <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">
5869                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5870                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5871                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5872                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5873                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5874                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5875                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5876                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5877                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5878                 </fields>
5879                 <links>
5880                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5881                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5882                 </links>
5883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5884                         <actions>
5885                                 <create permission="ADMIN_SERIAL_ITEM">
5886                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5887                                 </create>
5888                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5889                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5890                                 </retrieve>
5891                                 <update permission="ADMIN_SERIAL_ITEM">
5892                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5893                                 </update>
5894                                 <delete permission="ADMIN_SERIAL_ITEM">
5895                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5896                                 </delete>
5897                         </actions>
5898                 </permacrud>
5899         </class>
5900         <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">
5901                 <fields>
5902                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5903                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5904                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5905                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5906                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5907                 </fields>
5908                 <links>
5909                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5910                 </links>
5911         </class>
5912         <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">
5913                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5914                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5915                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5916                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5917                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5918                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5919                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5920                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5921                 </fields>
5922                 <links>
5923                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5924                 </links>
5925         </class>
5926         <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">
5927                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5928                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5929                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5930                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5931                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5932                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5933                 </fields>
5934                 <links>
5935                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5936                 </links>
5937                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5938                         <actions>
5939                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5940                                         <context link="distribution" field="holding_lib" />
5941                                 </create>
5942                                 <retrieve/>
5943                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5944                                         <context link="distribution" field="holding_lib" />
5945                                 </update>
5946                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5947                                         <context link="distribution" field="holding_lib" />
5948                                 </delete>
5949                         </actions>
5950                 </permacrud>
5951         </class>
5952
5953         <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">
5954                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5955                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5956                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5957                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5958                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5959                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5960                 </fields>
5961                 <links>
5962                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5963                 </links>
5964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5965                         <actions>
5966                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5967                                         <context link="distribution" field="holding_lib" />
5968                                 </create>
5969                                 <retrieve/>
5970                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5971                                         <context link="distribution" field="holding_lib" />
5972                                 </update>
5973                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5974                                         <context link="distribution" field="holding_lib" />
5975                                 </delete>
5976                         </actions>
5977                 </permacrud>
5978         </class>
5979
5980         <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">
5981                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5982                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5983                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5984                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5985                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5986                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5987                 </fields>
5988                 <links>
5989                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5990                 </links>
5991                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5992                         <actions>
5993                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5994                                         <context link="distribution" field="holding_lib" />
5995                                 </create>
5996                                 <retrieve/>
5997                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5998                                         <context link="distribution" field="holding_lib" />
5999                                 </update>
6000                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6001                                         <context link="distribution" field="holding_lib" />
6002                                 </delete>
6003                         </actions>
6004                 </permacrud>
6005         </class>
6006
6007         <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">
6008                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6009                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6010                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6011                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6012                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6013                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6014                 </fields>
6015                 <links>
6016                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6017                 </links>
6018                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6019                         <actions>
6020                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6021                                 <retrieve/>
6022                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6023                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6024                         </actions>
6025                 </permacrud>
6026         </class>
6027
6028         <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">
6029                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6030                         <field name="id" reporter:datatype="id" />
6031                         <field name="owning_copy" reporter:datatype="link"/>
6032                         <field name="stat_cat" reporter:datatype="link"/>
6033                         <field name="stat_cat_entry" reporter:datatype="link"/>
6034                 </fields>
6035                 <links>
6036                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6037                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6038                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6039                 </links>
6040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6041                         <actions>
6042                                 <retrieve/>
6043                         </actions>
6044                 </permacrud>
6045         </class>
6046         <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">
6047                 <fields oils_persist:primary="code">
6048                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6049                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6050                 </fields>
6051                 <links/>
6052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6053             <actions>
6054                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6055                 <retrieve/>
6056                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6057                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6058             </actions>
6059         </permacrud>
6060         </class>
6061         <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">
6062                 <fields oils_persist:primary="code">
6063                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6064                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6065                 </fields>
6066                 <links/>
6067         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6068             <actions>
6069                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6070                 <retrieve/>
6071                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6072                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6073             </actions>
6074         </permacrud>
6075         </class>
6076         <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">
6077                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6078                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6079                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6080                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6081                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6082                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6083                 </fields>
6084                 <links>
6085             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6086         </links>
6087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6088             <actions>
6089                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6090                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6091                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6092                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6093             </actions>
6094         </permacrud>
6095         </class>
6096         <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">
6097                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6098                         <field name="id" reporter:datatype="id" />
6099                         <field name="name" reporter:datatype="text"/>
6100                 </fields>
6101                 <links/>
6102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6103             <actions>
6104                 <create permission="CREATE_LASSO" global_required="true"/>
6105                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
6106                 <update permission="UPDATE_LASSO" global_required="true"/>
6107                 <delete permission="DELETE_LASSO" global_required="true"/>
6108             </actions>
6109         </permacrud>
6110         </class>
6111         <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">
6112                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6113                         <field name="id" reporter:datatype="id" />
6114                         <field name="lasso" reporter:datatype="link"/>
6115                         <field name="org_unit" reporter:datatype="org_unit"/>
6116                 </fields>
6117                 <links>
6118                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6119                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6120                 </links>
6121         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6122             <actions>
6123                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
6124                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
6125                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
6126                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
6127             </actions>
6128         </permacrud>
6129         </class>
6130         <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">
6131                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6132                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6133                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6134                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6135                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6136                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6137                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6138                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6139                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
6140                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6141                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6142                 </fields>
6143                 <links>
6144                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6145                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6146                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6147                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6148                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6149                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6150                 </links>
6151         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6152             <actions>
6153                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6154                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6155                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6156                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6157             </actions>
6158         </permacrud>
6159         </class>
6160         <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">
6161                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6162                         <field name="id" reporter:datatype="id" />
6163                         <field name="from_org" reporter:datatype="org_unit"/>
6164                         <field name="to_org" reporter:datatype="org_unit"/>
6165                         <field name="prox" reporter:datatype="int" />
6166                 </fields>
6167                 <links>
6168                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6169                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6170                 </links>
6171         </class>
6172         <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">
6173                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6174                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6175                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6176                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6177                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6178                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6179                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6180                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6181                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6182                 </fields>
6183                 <links/>
6184         </class>
6185         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6186                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6187                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6188                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6189                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6190                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6191                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6192                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6193                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6194                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6195                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6196                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6197                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6198                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6199                 </fields>
6200                 <links>
6201                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6202                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6203                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6204                 </links>
6205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6206             <actions>
6207                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6208                 <retrieve/>
6209                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6210                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6211             </actions>
6212         </permacrud>
6213         </class>
6214         <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">
6215                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6216                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6217                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6218                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6219                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6220                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6221                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6222                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6223                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6224                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6225                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6226                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6227                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6228                 </fields>
6229                 <links>
6230                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6231                 </links>
6232         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6233             <actions>
6234                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6235                 <retrieve/>
6236                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6237                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6238             </actions>
6239         </permacrud>
6240         </class>
6241         <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">
6242                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6243                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6244                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6245                         <field name="query_text" reporter:datatype="text"/>
6246                 </fields>
6247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6248             <actions>
6249                 <retrieve/>
6250             </actions>
6251         </permacrud>
6252         </class>
6253
6254         <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">
6255                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6256                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6257                         <field name="owner" reporter:datatype="org_unit"/>
6258                         <field name="code" reporter:datatype="text"/>
6259                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6260                         <field name="create_date" reporter:datatype="timestamp"/>
6261                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6262                 </fields>
6263                 <links>
6264                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6265                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6266                 </links>
6267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6268             <actions>
6269                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6270                 <retrieve/>
6271                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6272                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6273             </actions>
6274         </permacrud>
6275         </class>
6276         <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">
6277                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6278                         <field name="id" reporter:datatype="id"/>
6279                         <field name="grp" reporter:datatype="link"/>
6280                         <field name="pos" reporter:datatype="int"/>
6281                         <field name="query" reporter:datatype="link"/>
6282                 </fields>
6283                 <links>
6284                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6285                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6286                 </links>
6287         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6288             <actions>
6289                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6290                     <context link="grp" field="owner"/>
6291                 </create>
6292                 <retrieve/>
6293                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6294                     <context link="grp" field="owner"/>
6295                 </update>
6296                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6297                     <context link="grp" field="owner"/>
6298                 </delete>
6299             </actions>
6300         </permacrud>
6301         </class>
6302
6303         <!-- A note: Please update alhr and ahopl when updating ahr -->
6304         <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">
6305                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6306                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6307                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6308                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6309                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6310                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6311                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6312                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6313                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6314                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6315                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6316                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6317                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6318                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6319                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6320                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6321                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6322                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6323                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6324                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6325                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6326                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6327                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6328                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6329                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6330                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6331                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6332                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6333                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6334                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6335                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6336                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6337                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6338                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6339                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6340                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6341                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6342                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6343                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6344                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6345                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6346                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6347                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6348                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6349                 </fields>
6350                 <links>
6351                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6352                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6353                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6354                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6355                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6356                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6357                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6358                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6359                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6360                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6361                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6362                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6363                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6364                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6365                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6366                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6367                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6368                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6369                 </links>
6370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6371                         <actions>
6372                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6373                         </actions>
6374                 </permacrud>
6375         </class>
6376         <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">
6377                 <oils_persist:source_definition><![CDATA[
6378                 SELECT
6379                         ahr.*,
6380                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6381                                 copy_location_order_position,
6382                         CASE WHEN au.alias IS NOT NULL THEN
6383                                 au.alias
6384                         ELSE
6385                                 au.first_given_name
6386                         END AS usr_alias_or_first_given_name,
6387                         au.first_given_name AS usr_first_given_name,
6388                         au.second_given_name AS usr_second_given_name,
6389                         au.family_name AS usr_family_name,
6390                         au.prefix AS usr_prefix,
6391                         au.suffix AS usr_suffix,
6392                         au.alias AS usr_alias,
6393                         CASE WHEN au.alias IS NOT NULL THEN
6394                                 au.alias
6395                         ELSE
6396                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6397                                         COALESCE(au.family_name, ''),
6398                                         COALESCE(au.suffix, ''),
6399                                         ', ',
6400                                         COALESCE(au.prefix, ''),
6401                                         COALESCE(au.first_given_name, ''),
6402                                         COALESCE(au.second_given_name, '')
6403                                 ], ' '), E'\\s+,', ',')
6404                         END AS usr_alias_or_display_name,
6405                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6406                                 COALESCE(au.family_name, ''),
6407                                 COALESCE(au.suffix, ''),
6408                                 ', ',
6409                                 COALESCE(au.prefix, ''),
6410                                 COALESCE(au.first_given_name, ''),
6411                                 COALESCE(au.second_given_name, '')
6412                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6413                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6414                                 AS call_number_label,
6415                         siss.label AS issuance_label,
6416                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6417                         ahcm_1.copy_count AS potential_copies
6418                 FROM action.hold_request ahr
6419                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6420                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6421                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6422                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6423                 JOIN actor.usr au ON (au.id = ahr.usr)
6424                 JOIN (
6425                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6426                         FROM asset.copy_location
6427                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6428                 LEFT JOIN actor.usr_standing_penalty ausp 
6429                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6430                 LEFT JOIN config.standing_penalty csp
6431                         ON (
6432                                 csp.id = ausp.standing_penalty AND 
6433                                 csp.block_list LIKE '%CAPTURE%' AND (
6434                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6435                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6436                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6437                                         )
6438                                 )
6439                         )
6440                 JOIN (
6441                         SELECT COUNT(target_copy) AS copy_count, hold
6442                         FROM action.hold_copy_map
6443                         GROUP BY 2
6444                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6445                 LEFT JOIN serial.issuance siss
6446                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6447                 LEFT JOIN asset.copy_location_order acplo
6448                         ON (acp.location = acplo.location AND
6449                                 acp.circ_lib = acplo.org)
6450                 WHERE
6451                         ahr.capture_time IS NULL AND
6452                         ahr.cancel_time IS NULL AND
6453                         csp.id IS NULL AND
6454                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6455                         acp.status IN (0,7)
6456                 ]]></oils_persist:source_definition>
6457                 <fields oils_persist:primary="id">
6458                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6459                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6460                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6461                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6462                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6463                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6464                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6465                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6466                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6467                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6468                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6469                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6470                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6471                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6472                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6473                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6474                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6475                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6476                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6477                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6478                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6479                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6480                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6481                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6482                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6483                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6484                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6485                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6486                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6487                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6488                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6489                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6490                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6491                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6492                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6493                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6494                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6495                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6496                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6497                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6498                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6499                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6500                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6501                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6502                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6503                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6504                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6505                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6506                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6507                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6508                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6509                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6510                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6511                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6512                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6513                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6514                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6515                 </fields>
6516                 <links>
6517                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6518                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6519                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6520                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6521                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6522                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6523                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6524                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6525                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6526                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6527                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6528                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6529                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6530                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6531                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6532                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6533                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6534                 </links>
6535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6536                         <actions>
6537                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6538                         </actions>
6539                 </permacrud>
6540         </class>
6541         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6542                 <oils_persist:source_definition><![CDATA[
6543                         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)
6544                 ]]></oils_persist:source_definition>
6545                 <fields oils_persist:primary="id">
6546                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6547                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6548                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6549                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6550                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6551                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6552                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6553                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6554                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6555                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6556                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6557                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6558                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6559                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6560                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6561                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6562                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6563                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6564                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6565                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6566                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6567                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6568                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6569                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6570                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6571                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6572                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6573                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6574                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6575                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6576                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6577                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6578                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6579                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6580                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6581                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6582                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6583                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6584                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6585                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6586                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6587                 </fields>
6588                 <links>
6589                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6590                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6591                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6592                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6593                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6594                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6595                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6596                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6597                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6598                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6599                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6600                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6601                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6602                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6603                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6604                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6605                 </links>
6606         </class>
6607
6608         <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">
6609                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6610                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6611                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6612                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6613                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6614                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6615                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6616                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6617                 </fields>
6618                 <links>
6619                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6620                 </links>
6621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6622                         <actions>
6623                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6624                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6625                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6626                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6627                         </actions>
6628                 </permacrud>
6629         </class>
6630         <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">
6631                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6632                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6633                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6634                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6635                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6636                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6637                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6638                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6639                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6640                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6641                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6642                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6643                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6644                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6645                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6646                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6647                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6648                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6649                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6650                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6651                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6652                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6653                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6654                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6655                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6656                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6657                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6658                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6659                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6660                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6661                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6662                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6663                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6664                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6665                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6666                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6667                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6668                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6669                 </fields>
6670                 <links>
6671                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6672                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6673                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6674                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6675                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6676                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6677                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6678                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6679                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6680                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6681                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6682                 </links>
6683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6684                         <actions>
6685                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6686                         </actions>
6687                 </permacrud>
6688         </class>
6689         <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">
6690                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6691                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6692                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6693                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6694                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6695                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6696                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6697                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6698                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6699                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6700                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6701                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6702                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6703                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6704                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6705                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6706                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6707                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6708                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6709                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6710                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6711                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6712                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6713                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6714                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6715                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6716                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6717                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6718                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6719                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6720                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6721                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6722                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6723                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6724                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6725                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6726                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6727                 </fields>
6728                 <links>
6729                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6730                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6731                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6732                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6733                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6734                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6735                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6736                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6737                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6738                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6739                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6740                 </links>
6741                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6742                         <actions>
6743                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6744                         </actions>
6745                 </permacrud>
6746         </class>
6747
6748         <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">
6749                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6750                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6751                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6752                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6753                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6754                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6755                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6756                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
6757                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
6758                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6759                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6760                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6761                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6762                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6763                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
6764                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6765                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6766                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6767                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6768                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6769                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6770                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6771                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6772                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6773                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6774                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6775                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6776                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6777                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6778                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6779                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6780                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6781                 </fields>
6782                 <links>
6783                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6784                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6785                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6786                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6787                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6788                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6789                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6790                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6791                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6792                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6793                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6794                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6795                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6796                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6797                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6798                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6799                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6800                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6801                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6802                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6803                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6804                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6805                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6806                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6807                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6808                 </links>
6809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6810             <actions>
6811                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6812                 <retrieve />
6813                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6814                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6815             </actions>
6816         </permacrud>
6817         </class>
6818         <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">
6819                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6820                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6821                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6822                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6823                 </fields>
6824                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6825                         <actions>
6826                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6827                                 <retrieve/>
6828                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6829                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6830                         </actions>
6831                 </permacrud>
6832         </class>
6833         <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">
6834                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6835                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6836                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6837                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6838                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6839                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6840                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6841                 </fields>
6842                 <links>
6843                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6844                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6845                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6846                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6847                 </links>
6848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6849                         <actions>
6850                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6851                                 <retrieve/>
6852                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6853                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6854                         </actions>
6855                 </permacrud>
6856         </class>
6857         <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">
6858                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6859                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6860                         <field name="btype" reporter:datatype="text"/>
6861                         <field name="id" reporter:datatype="id" />
6862                         <field name="name"  reporter:datatype="text"/>
6863                         <field name="description" reporter:datatype="text"/>
6864                         <field name="owner" reporter:datatype="link"/>
6865                         <field name="pub" reporter:datatype="bool"/>
6866                         <field name="create_time" reporter:datatype="timestamp" />
6867                         <field name="owning_lib" reporter:datatype="org_unit" />
6868                 </fields>
6869                 <links>
6870                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6871                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6872                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6873                 </links>
6874                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6875                         <actions>
6876                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6877                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6878                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6879                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6880                         </actions>
6881                 </permacrud>
6882         </class>
6883         <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">
6884                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6885                         <field name="id" reporter:datatype="id" />
6886                         <field name="bucket" reporter:datatype="link"/>
6887                         <field name="note" reporter:datatype="text" />
6888                 </fields>
6889                 <links>
6890                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6891                 </links>
6892         </class>
6893         <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">
6894                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6895                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6896                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6897                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6898                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6899                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6900                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6901                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6902                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6903                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6904                 </fields>
6905                 <links>
6906                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6907                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6908                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6909                 </links>
6910                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6911                         <actions>
6912                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6913                         </actions>
6914                 </permacrud>
6915         </class>
6916         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6917                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6918                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6919                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6920                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6921                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6922                 </fields>
6923                 <links>
6924                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6925                 </links>
6926                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6927                         <actions>
6928                                 <retrieve permission="VIEW_USER user_request.view">
6929                                         <context link="usr" field="home_ou" />
6930                                 </retrieve>
6931                         </actions>
6932                 </permacrud>
6933         </class>
6934     <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">
6935         <fields oils_persist:primary="field">
6936             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6937             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6938             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6939         </fields>
6940         <links/>
6941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6942             <actions>
6943                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6944                 <retrieve />
6945                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6946                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6947             </actions>
6948         </permacrud>
6949     </class>
6950         <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">
6951                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6952                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6953                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6954                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6955                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6956                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6957                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6958                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6959                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6960                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6961                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6962                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6963                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6964                 </fields>
6965                 <links>
6966                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6967                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6968                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6969                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6970                 </links>
6971         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6972             <actions>
6973                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6974                 <retrieve />
6975                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6976                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6977             </actions>
6978         </permacrud>
6979         </class>
6980         <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">
6981                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6982                         <field name="field" reporter:datatype="link"/>
6983                         <field name="id" reporter:datatype="id" />
6984                         <field name="source" reporter:datatype="link"/>
6985                         <field name="value"  reporter:datatype="text"/>
6986                 </fields>
6987                 <links>
6988                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6989                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6990                 </links>
6991         </class>
6992         <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">
6993                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6994                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6995                         <field name="btype" reporter:datatype="text"/>
6996                         <field name="id" reporter:datatype="id" />
6997                         <field name="name"  reporter:datatype="text"/>
6998                         <field name="description" reporter:datatype="text"/>
6999                         <field name="owner" reporter:datatype="link"/>
7000                         <field name="pub" reporter:datatype="bool"/>
7001                         <field name="create_time" reporter:datatype="timestamp" />
7002                         <field name="owning_lib" reporter:datatype="org_unit" />
7003                 </fields>
7004                 <links>
7005                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7006                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7007                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7008                 </links>
7009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7010                         <actions>
7011                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7012                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7013                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7014                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7015                         </actions>
7016                 </permacrud>
7017         </class>
7018         <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">
7019                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7020                         <field name="id" reporter:datatype="id" />
7021                         <field name="bucket" reporter:datatype="link"/>
7022                         <field name="note" reporter:datatype="text" />
7023                 </fields>
7024                 <links>
7025                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7026                 </links>
7027         </class>
7028         <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">
7029                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7030                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7031                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7032                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7033                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7034                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7035                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7036                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7037                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7038                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7039                 </fields>
7040                 <links>
7041                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7042                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7043                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7044                 </links>
7045         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7046             <actions>
7047                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7048                     <context link="xact" jump="usr" field="home_ou"/>
7049                 </retrieve>
7050                         </actions>
7051                 </permacrud>
7052         </class>
7053         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7054                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7055                         <field name="id" reporter:datatype="id" />
7056                         <field name="ind1" />
7057                         <field name="ind2" />
7058                         <field name="record" />
7059                         <field name="subfield" />
7060                         <field name="tag" />
7061                         <field name="value" />
7062                 </fields>
7063                 <links>
7064                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7065                 </links>
7066         </class>
7067         <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">
7068                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7069                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7070                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7071                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7072                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7073                 </fields>
7074                 <links>
7075                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7076                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7077                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7078                 </links>
7079         </class>
7080         <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">
7081                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7082                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7083                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7084                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7085                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7086                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7087                 </fields>
7088                 <links>
7089                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7090                 </links>
7091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7092             <actions>
7093                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7094                 <retrieve/>
7095                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7096                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7097             </actions>
7098         </permacrud>
7099
7100         </class>
7101         <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">
7102                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7103                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7104                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7105                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7106                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7107                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7108                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7109                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7110                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7111                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7112                 </fields>
7113                 <links>
7114                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7115                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7116                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7117                 </links>
7118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7119             <actions>
7120                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7121                 <retrieve/>
7122                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7123                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7124             </actions>
7125         </permacrud>
7126         </class>
7127         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7128                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7129                         <field name="create_date" reporter:datatype="timestamp"/>
7130                         <field name="creator" reporter:datatype="link"/>
7131                         <field name="edit_date" reporter:datatype="timestamp"/>
7132                         <field name="editor" reporter:datatype="link"/>
7133                         <field name="id" reporter:datatype="id" />
7134                         <field name="pub" reporter:datatype="bool"/>
7135                         <field name="record" reporter:datatype="link"/>
7136                         <field name="value"  reporter:datatype="text"/>
7137                 </fields>
7138                 <links>
7139                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7140                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7141                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7142                 </links>
7143         </class>
7144         <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">
7145                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7146                         <field name="balance_owed" reporter:datatype="money" />
7147                         <field name="total_owed" reporter:datatype="money" />
7148                         <field name="total_paid" reporter:datatype="money" />
7149                         <field name="usr" reporter:datatype="link"/>
7150                 </fields>
7151                 <links>
7152                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7153                 </links>
7154         </class>
7155     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7156                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7157                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7158                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7159                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7160                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7161                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7162                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7163                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7164                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7165                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7166                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7167                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7168                 </fields>
7169                 <links>
7170                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7171                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7172                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7173                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7174                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7175                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7176                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7177                 </links>
7178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7179             <actions>
7180                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7181             </actions>
7182         </permacrud>
7183         </class>
7184         <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">
7185                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7186                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7187                         <field name="quality" reporter:datatype="int" />
7188                         <field name="source" reporter:datatype="text"/>
7189                         <field name="transcendant" reporter:datatype="bool"/>
7190                         <field name="can_have_copies" reporter:datatype="bool"/>
7191                 </fields>
7192                 <links/>
7193         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7194             <actions>
7195                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7196                 <retrieve/>
7197                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7198                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7199             </actions>
7200         </permacrud>
7201         </class>
7202         <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">
7203                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7204                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7205                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7206                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7207                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7208                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7209                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7210                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7211                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7212                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7213                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7214                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7215                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7216                 </fields>
7217                 <links>
7218                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7219                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7220                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7221                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7222                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7223                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7224                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7225                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7226                 </links>
7227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7228                         <actions>
7229                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7230                                         <context link="usr" field="home_ou" />
7231                                 </retrieve>
7232                         </actions>
7233                 </permacrud>
7234         </class>
7235         <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">
7236                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7237                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7238                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7239                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7240                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7241                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7242                 </fields>
7243                 <links>
7244                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7245                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7246                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7247                 </links>
7248         </class>
7249         <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">
7250                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7251                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7252                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7253                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7254                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7255                 </fields>
7256                 <links>
7257                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7258                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7259                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7260                 </links>
7261         </class>
7262         <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">
7263                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7264                         <field name="bucket" reporter:datatype="link"/>
7265                         <field name="id" reporter:datatype="id" />
7266                         <field name="target_user" reporter:datatype="link"/>
7267                         <field name="create_time" reporter:datatype="timestamp" />
7268                         <field name="pos" reporter:datatype="int" />
7269                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7270                 </fields>
7271                 <links>
7272                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7273                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7274             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7275                 </links>
7276                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7277                         <actions>
7278                                 <retrieve permission="ADMIN_USER_BUCKET">
7279                     <context link="bucket" owning_lib="owning_lib"/>
7280                 </retrieve>
7281             </actions>
7282         </permacrud>
7283         </class>
7284         <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">
7285                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7286                         <field name="id" reporter:datatype="id" />
7287                         <field name="item" reporter:datatype="link"/>
7288                         <field name="note" reporter:datatype="text" />
7289                 </fields>
7290                 <links>
7291                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7292                 </links>
7293         </class>
7294         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7295                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7296                         <field name="balance_owed" reporter:datatype="money" />
7297                         <field name="total_owed" reporter:datatype="money" />
7298                         <field name="total_paid" reporter:datatype="money" />
7299                         <field name="usr" reporter:datatype="link"/>
7300                 </fields>
7301                 <links>
7302                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7303                 </links>
7304         </class>
7305         <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">
7306                 <fields oils_persist:primary="code" oils_persist:sequence="">
7307                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7308                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7309                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7310                 </fields>
7311                 <links/>
7312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7313             <actions>
7314                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7315                 <retrieve/>
7316                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7317                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7318             </actions>
7319         </permacrud>
7320         </class>
7321         <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">
7322                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7323                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7324                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7325                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7326                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7327                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7328                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7329                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7330                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7331                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7332                 </fields>
7333                 <links>
7334                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7335                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7336                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7337                 </links>
7338         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7339             <actions>
7340                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7341                     <context link="xact" jump="usr" field="home_ou"/>
7342                 </retrieve>
7343                         </actions>
7344                 </permacrud>
7345         </class>
7346         <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">
7347                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7348                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7349                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7350                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7351                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7352                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7353                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7354                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7355                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7356                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7357                 </fields>
7358                 <links>
7359                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7360                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7361                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7362                 </links>
7363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7364             <actions>
7365                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7366                     <context link="xact" jump="usr" field="home_ou"/>
7367                 </retrieve>
7368                         </actions>
7369                 </permacrud>
7370         </class>
7371         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7372                 <fields oils_persist:primary="id" oils_persist:sequence="">
7373                         <field name="checkin_lib" reporter:datatype="link"/>
7374                         <field name="checkin_staff" reporter:datatype="link"/>
7375                         <field name="checkin_time" reporter:datatype="timestamp"/>
7376                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7377                         <field name="circ_staff" reporter:datatype="link"/>
7378                         <field name="desk_renewal" reporter:datatype="bool"/>
7379                         <field name="due_date" reporter:datatype="timestamp"/>
7380                         <field name="duration" reporter:datatype="interval"/>
7381                         <field name="duration_rule" reporter:datatype="link"/>
7382                         <field name="fine_interval" reporter:datatype="interval"/>
7383                         <field name="id" reporter:datatype="id" />
7384                         <field name="max_fine" reporter:datatype="money" />
7385                         <field name="max_fine_rule" reporter:datatype="link"/>
7386                         <field name="opac_renewal" reporter:datatype="bool"/>
7387                         <field name="phone_renewal" reporter:datatype="bool"/>
7388                         <field name="recurring_fine" reporter:datatype="money" />
7389                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7390                         <field name="renewal_remaining" reporter:datatype="int" />
7391             <field name="grace_period" reporter:datatype="interval" />
7392                         <field name="stop_fines" reporter:datatype="text"/>
7393                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7394                         <field name="target_copy" reporter:datatype="link"/>
7395                         <field name="usr" reporter:datatype="link"/>
7396                         <field name="xact_finish" reporter:datatype="timestamp" />
7397                         <field name="xact_start" reporter:datatype="timestamp" />
7398                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7399                         <field name="auto_renewal" reporter:datatype="bool"/>
7400                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7401                 </fields>
7402                 <links>
7403                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7404                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7405                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7406                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7407                 </links>
7408         </class>
7409         <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">
7410                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7411                         <field name="field" reporter:datatype="link"/>
7412                         <field name="id" reporter:datatype="id" />
7413                         <field name="source" reporter:datatype="link"/>
7414                         <field name="value" reporter:datatype="text"/>
7415                 </fields>
7416                 <links>
7417                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7418                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7419                 </links>
7420         </class>
7421         <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">
7422                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7423                         <field name="high" reporter:datatype="money" />
7424                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7425                         <field name="low" reporter:datatype="money" />
7426                         <field name="name" reporter:datatype="text"/>
7427                         <field name="normal" reporter:datatype="money" />
7428                         <field name="recurrence_interval" reporter:datatype="interval"/>
7429             <field name="grace_period" reporter:datatype="interval" />
7430                 </fields>
7431                 <links/>
7432         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7433             <actions>
7434                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7435                 <retrieve/>
7436                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7437                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7438             </actions>
7439         </permacrud>
7440         </class>
7441         <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">
7442                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7443                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7444                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7445                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7446                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7447                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7448                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7449                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7450                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7451                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7452                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7453                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7454                 </fields>
7455                 <links>
7456                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7457                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7458                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7459                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7460                 </links>
7461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7462             <actions>
7463                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7464                     <context link="xact" jump="usr" field="home_ou"/>
7465                 </retrieve>
7466                         </actions>
7467                 </permacrud>
7468         </class>
7469         <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">
7470                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7471                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7472                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7473                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7474                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7475                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7476                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7477                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7478                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7479                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7480                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7481                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7482                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7483                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7484                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7485                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7486                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7487                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7488                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7489                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7490                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7491                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7492                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7493                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
7494                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7495                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7496                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7497                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7498                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7499                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7500                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7501                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7502                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7503                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7504                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7505                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7506                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7507                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7508                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7509                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7510                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7511                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7512                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7513                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7514                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7515                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7516                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7517                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7518                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7519                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7520                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7521                 </fields>
7522                 <links>
7523                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7524                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7525                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7526                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7527                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7528                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7529                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7530                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7531                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7532                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7533                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7534                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7535                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7536                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7537                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7538                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7539                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7540                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7541                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7542                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7543                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7544                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7545                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7546                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7547                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7548                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7549                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7550                 </links>
7551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7552             <actions>
7553                 <create permission="CREATE_COPY">
7554                     <context link="call_number" field="owning_lib"/>
7555                 </create>
7556                 <retrieve/>
7557                 <update permission="UPDATE_COPY">
7558                     <context link="call_number" field="owning_lib"/>
7559                 </update>
7560                 <delete permission="DELETE_COPY">
7561                     <context link="call_number" field="owning_lib"/>
7562                 </delete>
7563             </actions>
7564         </permacrud>
7565         </class>
7566
7567         <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">
7568                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7569             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7570                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7571                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7572                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7573                 </fields>
7574                 <links>
7575                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7576                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7577                 </links>
7578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7579             <actions>
7580                                 <create/>
7581                                 <retrieve/>
7582                                 <update/>
7583                                 <delete/>
7584             </actions>
7585         </permacrud>
7586         </class>
7587
7588         <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">
7589                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7590                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7591                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7592                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7593                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7594                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7595                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7596                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7597                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7598                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7599                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7600                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7601                 </fields>
7602                 <links>
7603                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7604                 </links>
7605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7606             <actions>
7607                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7608                 <retrieve/>
7609                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7610                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7611             </actions>
7612         </permacrud>
7613         </class>
7614
7615         <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">
7616                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7617                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7618                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7619                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7620                 </fields>
7621                 <links>
7622                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7623                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7624                 </links>
7625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7626             <actions>
7627                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7628                 <retrieve/>
7629                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7630                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7631             </actions>
7632         </permacrud>
7633         </class>
7634
7635         <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">
7636                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7637                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7638                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7639                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7640                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7641                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7642                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7643                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7644                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7645                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7646                 </fields>
7647                 <links>
7648                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7649                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7650                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7651                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7652                 </links>
7653         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7654             <actions>
7655                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7656                     <context link="copy" field="circ_lib"/>
7657                 </create>
7658                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7659                     <context link="copy" field="circ_lib"/>
7660                                 </retrieve>
7661                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7662                     <context link="copy" field="circ_lib"/>
7663                                 </update>
7664                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7665                     <context link="copy" field="circ_lib"/>
7666                                 </delete>
7667             </actions>
7668         </permacrud>
7669         </class>
7670
7671         <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">
7672                 <fields oils_persist:primary="id">
7673                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7674                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7675                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7676                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7677                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7678                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7679                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7680                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7681                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7682                 </fields>
7683                 <links>
7684                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7685                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7686                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7687                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7688                 </links>
7689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7690             <actions>
7691                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7692                     <context link="copy" field="circ_lib"/>
7693                 </create>
7694                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7695                     <context link="copy" field="circ_lib"/>
7696                                 </retrieve>
7697                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7698                     <context link="copy" field="circ_lib"/>
7699                                 </update>
7700                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7701                     <context link="copy" field="circ_lib"/>
7702                                 </delete>
7703             </actions>
7704         </permacrud>
7705         </class>
7706
7707         <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">
7708                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7709                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7710                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7711                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7712                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7713                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7714                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7715                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7716                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7717                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7718                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7719                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7720                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7721                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7722                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7723                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7724                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7725                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7726                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7727                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7728                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7729                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7730                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7731                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7732                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7733                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7734                 </fields>
7735                 <links>
7736                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7737                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7738                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7739                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7740                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7741                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7742                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7743                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7744                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7745                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7746                 </links>
7747                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7748                         <actions>
7749                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7750                                 <retrieve />
7751                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7752                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7753                         </actions>
7754                 </permacrud>
7755         </class>
7756
7757         <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">
7758                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7759                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7760                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7761                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7762                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7763                 </fields>
7764                 <links/>
7765         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7766             <actions>
7767                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7768                 <retrieve/>
7769                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7770                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7771             </actions>
7772         </permacrud>
7773         </class>
7774         <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">
7775                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7776                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7777                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7778                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7779                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7780                 </fields>
7781                 <links/>
7782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7783             <actions>
7784                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7785                 <retrieve/>
7786                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7787                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7788             </actions>
7789         </permacrud>
7790         </class>
7791         <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">
7792                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7793                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7794                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7795                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7796                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7797                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7798                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7799                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7800                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7801                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7802                 </fields>
7803                 <links>
7804                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7805                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7806                 </links>
7807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7808             <actions>
7809                 <create permission="CREATE_PERM" global_required="true"/>
7810                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7811                 <update permission="UPDATE_PERM" global_required="true"/>
7812                 <delete permission="DELETE_PERM" global_required="true"/>
7813             </actions>
7814         </permacrud>
7815         </class>
7816         <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">
7817                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
7818                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7819                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
7820                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7821                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
7822                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7823                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7824                 </fields>
7825                 <links>
7826                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
7827                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7828                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7829                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
7830                 </links>
7831                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7832                         <actions>
7833                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7834                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7835                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7836                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7837                         </actions>
7838                 </permacrud>
7839         </class>
7840         <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">
7841                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7842                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7843                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7844                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7845                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7846                 </fields>
7847                 <links>
7848                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7849                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7850                 </links>
7851         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7852             <actions>
7853                 <create permission="ADMIN_SURVEY">
7854                     <context link="question" jump="survey" field="owner"/>
7855                 </create>
7856                 <retrieve/>
7857                 <update permission="ADMIN_SURVEY">
7858                     <context link="question" jump="survey" field="owner"/>
7859                 </update>
7860                 <delete permission="ADMIN_SURVEY">
7861                     <context link="question" jump="survey" field="owner"/>
7862                 </delete>
7863             </actions>
7864         </permacrud>
7865         </class>
7866         <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">
7867                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7868                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7869                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7870                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7871                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7872                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7873                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7874                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7875                 </fields>
7876                 <links>
7877                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7878                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7879                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7880                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7881                 </links>
7882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7883                         <actions>
7884                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7885                         </actions>
7886                 </permacrud>
7887         </class>
7888         <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">
7889                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7890                         <field name="balance_owed" reporter:datatype="money" />
7891                         <field name="total_owed" reporter:datatype="money" />
7892                         <field name="total_paid" reporter:datatype="money" />
7893                         <field name="usr" reporter:datatype="link"/>
7894                 </fields>
7895                 <links>
7896                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7897                 </links>
7898         </class>
7899         <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">
7900                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7901                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7902                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7903                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7904                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7905                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7906                 </fields>
7907                 <links>
7908                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7909                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7910                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7911                 </links>
7912         </class>
7913         <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">
7914                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7915                         <field name="field" reporter:datatype="link"/>
7916                         <field name="id" reporter:datatype="id" />
7917                         <field name="source" reporter:datatype="link"/>
7918                         <field name="value" reporter:datatype="text"/>
7919                 </fields>
7920                 <links>
7921                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7922                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7923                 </links>
7924         </class>
7925         <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">
7926                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7927                         <field name="field" reporter:datatype="link"/>
7928                         <field name="id" reporter:datatype="id" />
7929                         <field name="source" reporter:datatype="link"/>
7930                         <field name="value" reporter:datatype="text"/>
7931                 </fields>
7932                 <links>
7933                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7934                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7935                 </links>
7936         </class>
7937         <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">
7938                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7939                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7940                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7941                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7942                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7943                 </fields>
7944                 <links>
7945                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7946                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7947                 </links>
7948         </class>
7949         <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">
7950                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7951                         <field name="depth" reporter:datatype="int" />
7952                         <field name="grantable" reporter:datatype="bool"/>
7953                         <field name="grp" reporter:datatype="link"/>
7954                         <field name="id" reporter:datatype="id" />
7955                         <field name="perm" reporter:datatype="link"/>
7956                 </fields>
7957                 <links>
7958                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7959                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7960                 </links>
7961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7962             <actions>
7963                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7964                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7965                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7966                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7967             </actions>
7968         </permacrud>
7969         </class>
7970         <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">
7971                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7972                         <field name="items" oils_persist:virtual="true" />
7973                         <field name="btype" reporter:datatype="text"/>
7974                         <field name="id" reporter:datatype="id" />
7975                         <field name="name" reporter:datatype="text"/>
7976                         <field name="description" reporter:datatype="text"/>
7977                         <field name="owner" reporter:datatype="link"/>
7978                         <field name="pub" reporter:datatype="bool"/>
7979                         <field name="create_time" reporter:datatype="timestamp" />
7980                         <field name="owning_lib" reporter:datatype="org_unit" />
7981                 </fields>
7982                 <links>
7983                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7984                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7985                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7986                 </links>
7987                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7988                         <actions>
7989                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7990                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7991                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7992                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7993                         </actions>
7994                 </permacrud>
7995         </class>
7996         <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">
7997                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7998                         <field name="id" reporter:datatype="id" />
7999                         <field name="bucket" reporter:datatype="link"/>
8000                         <field name="note" reporter:datatype="text" />
8001                 </fields>
8002                 <links>
8003                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8004                 </links>
8005         </class>
8006         <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">
8007                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8008                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8009                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8010                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8011                 </fields>
8012                 <links>
8013                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8014                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8015                 </links>
8016         </class>
8017         <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">
8018                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8019                         <field name="depth" reporter:datatype="int"/>
8020                         <field name="grantable" reporter:datatype="bool"/>
8021                         <field name="id" reporter:datatype="id" />
8022                         <field name="perm" reporter:datatype="link"/>
8023                         <field name="usr" reporter:datatype="link"/>
8024                 </fields>
8025                 <links>
8026                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8027                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8028                 </links>
8029         </class>
8030         <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">
8031                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8032                         <field name="object_id" reporter:datatype="text"/>
8033                         <field name="grantable" reporter:datatype="bool"/>
8034                         <field name="id" reporter:datatype="id" />
8035                         <field name="perm" reporter:datatype="link"/>
8036                         <field name="usr" reporter:datatype="link"/>
8037                         <field name="object_type" reporter:datatype="text"/>
8038                 </fields>
8039                 <links>
8040                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8041                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8042                 </links>
8043         </class>
8044         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
8045                 <fields oils_persist:primary="id" oils_persist:sequence="">
8046                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8047                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8048                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8049                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8050                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8051                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8052                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8053                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8054                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8055                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8056                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8057                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8058                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8059                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8060                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8061                 </fields>
8062                 <links>
8063                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8064                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8065                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8066                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8067                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8068                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8069                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8070                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8071                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8072                 </links>
8073         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8074             <actions>
8075                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8076                     <context link="xact" jump="usr" field="home_ou"/>
8077                 </retrieve>
8078                         </actions>
8079                 </permacrud>
8080         </class>
8081         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8082                 oils_obj:fieldmapper="money::aged_payment" 
8083                 oils_persist:tablename="money.aged_payment" 
8084                 reporter:label="Payments: Aged">
8085                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8086                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8087                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8088                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8089                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8090                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8091                         <field reporter:label="Aged Circulation" name="xact" reporter:datatype="link"/>
8092                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8093                 </fields>
8094                 <links>
8095                         <link field="xact" reltype="has_a" key="id" map="" class="acirc"/>
8096                 </links>
8097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8098                         <actions>
8099                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8100                                         <context link="xact" field="usr_home_ou"/>
8101                                 </retrieve>
8102                         </actions>
8103                 </permacrud>
8104         </class>
8105         <class id="mallp" controller="open-ils.cstore" 
8106                 oils_obj:fieldmapper="money::all_payments" 
8107                 oils_persist:tablename="money.all_payments" 
8108                 oils_persist="readonly" reporter:label="All Payments">
8109                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8110                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8111                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8112                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8113                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8114                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8115                         <field reporter:label="Aged Circulation" name="xact" reporter:datatype="link"/>
8116                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8117                 </fields>
8118                 <links>
8119                         <!-- 
8120                                 'xact' may link to a money.billabl_xact or to a money.aged_circulation.
8121                          -->
8122                 </links>
8123         </class>
8124
8125         <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">
8126                 <fields oils_persist:primary="id" oils_persist:sequence="">
8127                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8128                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8129                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8130                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8131                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8132                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8133                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8134                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8135                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8136                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8137                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8138                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8139                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8140                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8141                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8142                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8143                 </fields>
8144                 <links>
8145                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8146                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8147                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8148                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8149                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8150                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8151                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8152                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8153                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8154                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8155                 </links>
8156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8157                         <actions>
8158                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8159                                         <context link="xact" jump="usr" field="home_ou"/>
8160                                 </retrieve>
8161                         </actions>
8162                 </permacrud>
8163         </class>
8164         <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">
8165                 <fields oils_persist:primary="id" oils_persist:sequence="">
8166                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8167                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8168                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8169                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8170                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8171                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8172                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8173                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8174                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8175                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8176                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8177                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8178                 </fields>
8179                 <links>
8180                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8181                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8182                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8183                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8184                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8185                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8186                 </links>
8187         </class>
8188         <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">
8189                 <fields oils_persist:primary="id" oils_persist:sequence="">
8190                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8191                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8192                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8193                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8194                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8195                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8196                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8197                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8198                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8199                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8200                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8201                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8202                 </fields>
8203                 <links>
8204                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8205                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8206                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8207                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8208                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8209                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8210                 </links>
8211         </class>
8212         <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">
8213                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8214                         <field name="bucket" reporter:datatype="link"/>
8215                         <field name="id" reporter:datatype="id" />
8216                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8217                         <field name="create_time" reporter:datatype="timestamp" />
8218                         <field name="pos" reporter:datatype="int" />
8219                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8220                 </fields>
8221                 <links>
8222                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8223                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8224             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8225                 </links>
8226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8227                         <actions>
8228                                 <retrieve permission="ADMIN_COPY_BUCKET">
8229                     <context link="bucket" owning_lib="owning_lib"/>
8230                 </retrieve>
8231             </actions>
8232         </permacrud>
8233         </class>
8234         <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">
8235                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8236                         <field name="id" reporter:datatype="id" />
8237                         <field name="item" reporter:datatype="link"/>
8238                         <field name="note" reporter:datatype="text" />
8239                 </fields>
8240                 <links>
8241                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8242                 </links>
8243         </class>
8244         <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">
8245                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8246                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8247                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8248                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8249                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8250                 </fields>
8251                 <links>
8252                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8253                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8254                 </links>
8255                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8256                         <actions>
8257                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8258                         </actions>
8259                 </permacrud>
8260         </class>
8261     <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">
8262         <fields oils_persist:primary="field">
8263             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8264             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8265             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8266         </fields>
8267         <links/>
8268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8269             <actions>
8270                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8271                 <retrieve />
8272                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8273                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8274             </actions>
8275         </permacrud>
8276     </class>
8277         <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">
8278                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8279                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8280                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8281                 </fields>
8282                 <links/>
8283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8284             <actions>
8285                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8286                 <retrieve/>
8287                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8288                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8289             </actions>
8290         </permacrud>
8291         </class>
8292
8293
8294         <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">
8295                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8296                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8297                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8298                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8299                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8300                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8301                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8302                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8303                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8304                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8305                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8306                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8307                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8308                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8309                 </fields>
8310                 <links>
8311                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8312                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8313                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8314                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8315                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8316                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8317                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8318                 </links>
8319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8320             <actions>
8321                 <create permission="TRANSIT_COPY">
8322                     <context link="target_copy" field="owner"/>
8323                 </create>
8324                 <retrieve/>
8325                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8326                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8327             </actions>
8328         </permacrud>
8329         </class>
8330         <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">
8331                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8332                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8333                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8334                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8335                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8336                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8337                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8338                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8339                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8340                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8341                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8342                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8343                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8344                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8345                 </fields>
8346                 <links>
8347                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8348                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8349                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8350                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8351                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8352                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8353                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8354                 </links>
8355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8356             <actions>
8357                 <create permission="TRANSIT_COPY" context_field="owner">
8358                     <context link="target_copy" field="circ_lib"/>
8359                 </create>
8360                 <retrieve/>
8361                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8362                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8363             </actions>
8364         </permacrud>
8365         </class>
8366         <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">
8367                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8368                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8369                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8370                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8371                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8372                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8373                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8374                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8375                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8376                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8377                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8378                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8379                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8380                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8381                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8382                 </fields>
8383                 <links>
8384                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8385                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8386                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8387                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8388                 </links>
8389         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8390             <actions>
8391                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8392                     <context link="xact" jump="usr" field="home_ou"/>
8393                 </retrieve>
8394                         </actions>
8395                 </permacrud>
8396         </class>
8397         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8398                 oils_obj:fieldmapper="money::aged_billing" 
8399                 oils_persist:tablename="money.aged_billing" 
8400                 reporter:label="Aged Billing Line Item">
8401                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8402                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8403                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8404                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8405                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8406                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8407                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8408                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8409                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8410                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8411                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8412                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8413                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8414                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8415                 </fields>
8416                 <links>
8417                         <link field="xact" reltype="has_a" key="id" map="" class="acirc"/>
8418                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8419                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8420                 </links>
8421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8422                         <actions>
8423                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8424                                         <context link="xact" field="usr_home_ou"/>
8425                                 </retrieve>
8426                         </actions>
8427                 </permacrud>
8428         </class>
8429         <class id="mallb" controller="open-ils.cstore" 
8430                 oils_obj:fieldmapper="money::all_billings" 
8431                 oils_persist:tablename="money.all_billings" 
8432                 oils_persist="readonly" reporter:label="All Billing Line Items">
8433                 <fields oils_persist:primary="id" oils_persist:sequence="">
8434                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8435                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8436                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8437                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8438                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8439                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8440                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8441                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8442                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8443                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8444                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8445                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8446                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8447                 </fields>
8448                 <links>
8449                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8450                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8451                         <!-- 
8452                                 'xact' may link to a money.billabl_xact or to a money.aged_circulation.
8453                          -->
8454                 </links>
8455         </class>
8456         <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">
8457                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8458                         <field name="grp" />
8459                         <field name="id" reporter:datatype="id" />
8460                         <field name="usr" />
8461                 </fields>
8462                 <links>
8463                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8464                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8465                 </links>
8466         </class>
8467         <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">
8468                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8469                         <field name="id" reporter:datatype="id" />
8470                         <field name="fq_field" reporter:datatype="text"/>
8471                         <field name="identity_value" reporter:datatype="text"/>
8472                         <field name="translation" reporter:datatype="text"/>
8473                         <field name="string" reporter:datatype="text"/>
8474                 </fields>
8475                 <links>
8476                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8477                 </links>
8478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8479             <actions>
8480                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8481                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8482                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8483                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8484             </actions>
8485         </permacrud>
8486         </class>
8487         <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">
8488                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8489                         <field name="id" reporter:datatype="id" />
8490                         <field name="fm_class" reporter:datatype="text"/>
8491                         <field name="field" reporter:datatype="text"/>
8492                         <field name="owner" reporter:datatype="org_unit"/>
8493                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8494                 </fields>
8495                 <links>
8496                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8497                 </links>
8498         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8499             <actions>
8500                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8501                 <retrieve/>
8502                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8503                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8504             </actions>
8505         </permacrud>
8506         </class>
8507         <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">
8508                 <fields oils_persist:primary="code">
8509                         <field name="code" reporter:datatype="id" />
8510                         <field name="marc_code" reporter:datatype="text"/>
8511                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8512                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8513                         <field name="rtl" reporter:datatype="bool"/>
8514                 </fields>
8515                 <links/>
8516         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8517             <actions>
8518                 <create permission="CREATE_LOCALE" global_required="true"/>
8519                 <retrieve/>
8520                 <update permission="UPDATE_LOCALE" global_required="true"/>
8521                 <delete permission="DELETE_LOCALE" global_required="true"/>
8522             </actions>
8523         </permacrud>
8524         </class>
8525         <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">
8526                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8527                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
8528                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
8529                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
8530                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8531                 </fields>
8532                 <links>
8533                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8534                 </links>
8535         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8536             <actions>
8537                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8538                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8539                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8540                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8541             </actions>
8542         </permacrud>
8543         </class>
8544
8545         <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">
8546                 <fields oils_persist:primary="id">
8547                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8548                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8549                 </fields>
8550                 <links/>
8551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8552             <actions>
8553                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8554                 <retrieve/>
8555                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8556                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8557             </actions>
8558         </permacrud>
8559         </class>
8560
8561         <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">
8562                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8563                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8564                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8565                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8566                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8567                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8568                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8569                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8570                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8571                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8572                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8573                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8574                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8575                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8576                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8577                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8578                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8579                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8580                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8581                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8582                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8583                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8584                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8585                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8586                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8587                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8588                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8589                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8590                 </fields>
8591                 <links>
8592                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8593                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8594                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8595                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8596                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8597                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8598                 </links>
8599         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8600             <actions>
8601                 <create permission="user_request.create">
8602                     <context link="usr" field="home_ou"/>
8603                                 </create>
8604                 <retrieve permission="user_request.view">
8605                     <context link="usr" field="home_ou"/>
8606                                 </retrieve>
8607                 <update permission="user_request.update">
8608                     <context link="usr" field="home_ou"/>
8609                                 </update>
8610                 <delete permission="user_request.delete">
8611                     <context link="usr" field="home_ou"/>
8612                                 </delete>
8613             </actions>
8614         </permacrud>
8615         </class>
8616
8617         <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">
8618         <oils_persist:source_definition><![CDATA[
8619             SELECT r.*, CASE
8620                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
8621                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
8622                         WHEN l.state = 'received' THEN 5 -- Received
8623                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
8624                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
8625                         WHEN l.id IS NOT NULL THEN 2 -- Pending
8626                         WHEN l.id IS NULL THEN 1 -- New
8627                         ELSE 0 -- Error
8628                     END AS request_status
8629                     ,u.home_ou
8630             FROM      acq.user_request r
8631             JOIN actor.usr u ON (r.usr = u.id)
8632             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
8633             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
8634             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
8635         ]]></oils_persist:source_definition>
8636                 <fields oils_persist:primary="id">
8637                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8638                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8639                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8640                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8641                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8642                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8643                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8644                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8645                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8646                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8647                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8648                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8649                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8650                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8651                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8652                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8653                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8654                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8655                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8656                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8657                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8658                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8659                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8660                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8661                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8662                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8663                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8664                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
8665                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
8666                 </fields>
8667                 <links>
8668                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8669                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8670                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8671                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8672                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8673                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8674                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
8675                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8676                 </links>
8677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8678             <actions>
8679                 <retrieve permission="user_request.view">
8680                     <context link="usr" field="home_ou"/>
8681                                 </retrieve>
8682             </actions>
8683         </permacrud>
8684         </class>
8685
8686         <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">
8687                 <fields oils_persist:primary="id">
8688                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8689                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8690                 </fields>
8691                 <links/>
8692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8693             <actions>
8694                 <retrieve/>
8695             </actions>
8696         </permacrud>
8697         </class>
8698
8699         <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">
8700                 <fields oils_persist:primary="code">
8701                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8702                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8703                 </fields>
8704                 <links/>
8705         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8706             <actions>
8707                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8708                 <retrieve/>
8709                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8710                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8711             </actions>
8712         </permacrud>
8713         </class>
8714
8715         <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">
8716                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8717                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8718                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8719                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8720                         <field reporter:label="Ratio" name="ratio" />
8721                 </fields>
8722                 <links>
8723                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8724                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8725                 </links>
8726                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8727                         <actions>
8728                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8729                                 <retrieve/>
8730                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8731                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8732                         </actions>
8733                 </permacrud>
8734         </class>
8735
8736         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8737                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8738                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8739                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8740                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8741                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8742                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8743                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8744                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8745                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8746                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8747                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8748                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8749                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8750                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8751                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8752                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8753                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8754                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8755                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8756                 </fields>
8757                 <links>
8758                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8759                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8760             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8761             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8762                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8763                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8764                 </links>
8765         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8766             <actions>
8767                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8768                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8769                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8770                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8771             </actions>
8772         </permacrud>
8773         </class>
8774
8775         <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">
8776                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8777                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8778                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8779                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8780                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8781                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8782                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8783                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8784                 </fields>
8785                 <links>
8786                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8787                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8788                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8789                 </links>
8790         </class>
8791
8792         <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">
8793                 <fields oils_persist:primary="code">
8794                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8795                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8796                 </fields>
8797                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8798             <actions>
8799                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8800                 <retrieve/>
8801                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8802                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8803             </actions>
8804                 </permacrud>
8805         </class>
8806
8807         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8808                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8809                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8810                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8811                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8812                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8813                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8814                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8815                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8816                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8817                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8818                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8819                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8820                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
8821                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
8822                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8823                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8824                 </fields>
8825                 <links>
8826                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8827                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8828                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8829                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8830                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8831                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8832                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8833                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
8834                 </links>
8835         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8836             <actions>
8837                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8838                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8839                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8840                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8841             </actions>
8842         </permacrud>
8843         </class>
8844
8845         <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">
8846                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8847                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8848                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8849                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8850                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8851                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8852                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8853                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8854                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8855                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8856                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8857                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8858                 </fields>
8859                 <links>
8860                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8861                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8862                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8863                 </links>
8864         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8865             <actions>
8866                 <create   permission="ADMIN_INVOICE">
8867                                         <context link="invoice" field="receiver"/>
8868                                 </create>
8869                 <retrieve permission="ADMIN_INVOICE">
8870                                         <context link="invoice" field="receiver"/>
8871                                 </retrieve>
8872                 <update   permission="ADMIN_INVOICE">
8873                                         <context link="invoice" field="receiver"/>
8874                                 </update>
8875                                 <delete   permission="ADMIN_INVOICE">
8876                                         <context link="invoice" field="receiver"/>
8877                                 </delete>
8878             </actions>
8879         </permacrud>
8880         </class>
8881
8882         <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">
8883                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8884                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8885                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8886                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8887                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8888                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8889                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8890                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8891                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8892                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8893                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8894                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8895                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8896                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8897                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8898                 </fields>
8899                 <links>
8900                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8901                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8902                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8903                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8904                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8905                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8906                 </links>
8907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8908             <actions>
8909                 <create   permission="ADMIN_INVOICE">
8910                                         <context link="invoice" field="receiver"/>
8911                                 </create>
8912                 <retrieve permission="ADMIN_INVOICE">
8913                                         <context link="invoice" field="receiver"/>
8914                                 </retrieve>
8915                 <update   permission="ADMIN_INVOICE">
8916                                         <context link="invoice" field="receiver"/>
8917                                 </update>
8918                                 <delete   permission="ADMIN_INVOICE">
8919                                         <context link="invoice" field="receiver"/>
8920                                 </delete>
8921             </actions>
8922         </permacrud>
8923         </class>
8924
8925         <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">
8926                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8927                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8928                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8929                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8930                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8931                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8932                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8933                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8934                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8935                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8936                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8937                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8938                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8939                 </fields>
8940                 <links>
8941                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8942                 </links>
8943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8944             <actions>
8945                 <create permission="ADMIN_PROVIDER">
8946                     <context link="provider" field="owner"/>
8947                 </create>
8948                 <retrieve permission="ADMIN_PROVIDER">
8949                     <context link="provider" field="owner"/>
8950                 </retrieve>
8951                 <update permission="ADMIN_PROVIDER">
8952                     <context link="provider" field="owner"/>
8953                 </update>
8954                 <delete permission="ADMIN_PROVIDER">
8955                     <context link="provider" field="owner"/>
8956                 </delete>
8957             </actions>
8958         </permacrud>
8959         </class>
8960
8961         <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">
8962                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8963                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8964                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8965                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8966                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8967                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8968                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8969         </fields>
8970                 <links>
8971                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8972                 </links>
8973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8974             <actions>
8975                 <create permission="ADMIN_PROVIDER">
8976                     <context link="provider" field="owner"/>
8977                 </create>
8978                 <retrieve permission="ADMIN_PROVIDER">
8979                     <context link="provider" field="owner"/>
8980                 </retrieve>
8981                 <update permission="ADMIN_PROVIDER">
8982                     <context link="provider" field="owner"/>
8983                 </update>
8984                 <delete permission="ADMIN_PROVIDER">
8985                     <context link="provider" field="owner"/>
8986                 </delete>
8987             </actions>
8988         </permacrud>
8989     </class>
8990         <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">
8991                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8992                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8993                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8994                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8995                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8996                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8997                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8998                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8999                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
9000                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
9001                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
9002                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
9003                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9004                 </fields>
9005                 <links>
9006                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9007                 </links>
9008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9009             <actions>
9010                 <create permission="ADMIN_PROVIDER">
9011                     <context link="contact" jump='provider' field="owner"/>
9012                 </create>
9013                 <retrieve permission="ADMIN_PROVIDER">
9014                     <context link="contact" jump='provider' field="owner"/>
9015                 </retrieve>
9016                 <update permission="ADMIN_PROVIDER">
9017                     <context link="contact" jump='provider' field="owner"/>
9018                 </update>
9019                 <delete permission="ADMIN_PROVIDER">
9020                     <context link="contact" jump='provider' field="owner"/>
9021                 </delete>
9022             </actions>
9023         </permacrud>
9024         </class>
9025
9026         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
9027                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9028                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9029                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9030                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9031                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9032                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9033                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9034                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9035                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9036                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9037                 </fields>
9038                 <links>
9039                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9040                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9041                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9042                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9043                 </links>
9044         </class>
9045
9046         <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">
9047                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9048                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9049                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9050                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9051                 </fields>
9052                 <links>
9053             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9054                 </links>
9055                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9056                         <actions>
9057                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9058                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9059                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9060                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9061                         </actions>
9062                 </permacrud>
9063         </class>
9064
9065         <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">
9066                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9067                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9068                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9069                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9070                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9071                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9072                 </fields>
9073                 <links>
9074                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9075                 </links>
9076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9077                         <actions>
9078                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9079                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9080                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9081                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9082                         </actions>
9083                 </permacrud>
9084         </class>
9085
9086         <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">
9087                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9088                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9089                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9090                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
9091                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
9092                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9093                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9094                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9095                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9096                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9097                 </fields>
9098                 <links>
9099                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9100                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9101             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9102             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9103                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9104                 </links>
9105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9106             <actions>
9107                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9108                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9109                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9110                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9111             </actions>
9112         </permacrud>
9113         </class>
9114
9115         <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">
9116                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9117                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9118                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
9119                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9120                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9121                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9122                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9123                 </fields>
9124                 <links>
9125                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9126                 </links>
9127                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9128                         <actions>
9129                                 <create permission="ADMIN_FUNDING_SOURCE">
9130                     <context link="funding_source" field="owner"/>
9131                 </create>
9132                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9133                     <context link="funding_source" field="owner"/>
9134                 </retrieve>
9135                                 <update permission="ADMIN_FUNDING_SOURCE">
9136                     <context link="funding_source" field="owner"/>
9137                 </update>
9138                                 <delete permission="ADMIN_FUNDING_SOURCE">
9139                     <context link="funding_source" field="owner"/>
9140                 </delete>
9141                         </actions>
9142                 </permacrud>
9143         </class>
9144
9145         <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">
9146                 <fields oils_persist:primary="id">
9147                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9148                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9149                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9150                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9151                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9152                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9153                 </fields>
9154                 <links>
9155                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9156                 </links>
9157         </class>
9158
9159         <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">
9160                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9161                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9162                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9163                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9164                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9165                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9166                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9167                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9168                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9169                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9170                 </fields>
9171                 <links>
9172                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9173                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9174                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9175                 </links>
9176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9177                         <actions>
9178                                 <create permission="ADMIN_ACQ_FUND">
9179                     <context link="fund" field="org"/>
9180                 </create>
9181                                 <retrieve permission="ADMIN_ACQ_FUND">
9182                     <context link="fund" field="org"/>
9183                 </retrieve>
9184                                 <update permission="ADMIN_ACQ_FUND">
9185                     <context link="fund" field="org"/>
9186                 </update>
9187                                 <delete permission="ADMIN_ACQ_FUND">
9188                     <context link="fund" field="org"/>
9189                 </delete>
9190                         </actions>
9191                 </permacrud>
9192         </class>
9193
9194         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9195                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9196                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9197                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9198                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9199                         <field reporter:label="Year" name="year" reporter:datatype="int" />
9200                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9201                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9202                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9203                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9204                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9205                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9206                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9207                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9208                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9209                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9210                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9211                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9212                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9213                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9214                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9215                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9216                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9217                 </fields>
9218                 <links>
9219                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9220                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9221             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9222             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9223             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9224             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9225             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9226             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9227             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9228             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9229             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9230                 </links>
9231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9232             <actions>
9233                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9234                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9235                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9236                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9237             </actions>
9238         </permacrud>
9239         </class>
9240
9241         <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">
9242                 <fields oils_persist:primary="fund">
9243                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9244                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9245                 </fields>
9246                 <links>
9247                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9248                 </links>
9249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9250             <actions>
9251                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9252                                         <context link="fund" field="org" />
9253                 </retrieve>
9254             </actions>
9255         </permacrud>
9256         </class>
9257
9258         <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">
9259                 <fields oils_persist:primary="fund">
9260                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9261                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9262                 </fields>
9263                 <links>
9264                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9265                 </links>
9266         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9267             <actions>
9268                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9269                                         <context link="fund" field="org" />
9270                 </retrieve>
9271             </actions>
9272         </permacrud>
9273         </class>
9274
9275         <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">
9276                 <fields oils_persist:primary="fund">
9277                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9278                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9279                 </fields>
9280                 <links>
9281                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9282                 </links>
9283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9284             <actions>
9285                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9286                                         <context link="fund" field="org" />
9287                 </retrieve>
9288             </actions>
9289         </permacrud>
9290         </class>
9291
9292         <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">
9293                 <fields oils_persist:primary="fund">
9294                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9295                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9296                 </fields>
9297                 <links>
9298                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9299                 </links>
9300         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9301             <actions>
9302                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9303                                         <context link="fund" field="org" />
9304                 </retrieve>
9305             </actions>
9306         </permacrud>
9307         </class>
9308
9309         <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">
9310                 <fields oils_persist:primary="fund">
9311                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9312                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9313                 </fields>
9314                 <links>
9315                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9316                 </links>
9317         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9318             <actions>
9319                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9320                                         <context link="fund" field="org" />
9321                 </retrieve>
9322             </actions>
9323         </permacrud>
9324         </class>
9325
9326    <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">
9327         <fields oils_persist:primary="fund">
9328             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9329             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9330         </fields>
9331         <links>
9332             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9333         </links>
9334     </class>
9335
9336    <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">
9337         <fields oils_persist:primary="fund">
9338             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9339             <field reporter:label="Total Encumbered 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="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">
9347         <fields oils_persist:primary="fund">
9348             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9349             <field reporter:label="Total Spent 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="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">
9357         <fields oils_persist:primary="fund">
9358             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9359             <field reporter:label="Total Spent Balance" 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="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">
9367         <fields oils_persist:primary="fund">
9368             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9369             <field reporter:label="Total Combined 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="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">
9377                 <fields oils_persist:primary="funding_source">
9378                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9379                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9380                 </fields>
9381                 <links>
9382                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9383                 </links>
9384         </class>
9385
9386         <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">
9387                 <fields oils_persist:primary="funding_source">
9388                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9389                         <field reporter:label="Total Allocated from 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="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">
9397                 <fields oils_persist:primary="funding_source">
9398                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9399                         <field reporter:label="Balance Remaining" 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="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">
9407                 <fields oils_persist:primary="fund">
9408                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9409                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9410                 </fields>
9411                 <links>
9412                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9413                 </links>
9414         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9415             <actions>
9416                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9417                                         <context link="fund" field="org" />
9418                 </retrieve>
9419             </actions>
9420         </permacrud>
9421     </class>
9422     <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">
9423         <oils_persist:source_definition><![CDATA[
9424             SELECT
9425                 acqf.*,
9426                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9427                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9428                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9429                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9430             FROM
9431                 acq.fund acqf
9432                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9433                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9434                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9435                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9436         ]]></oils_persist:source_definition>
9437         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9438             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9439             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9440             <field reporter:label="Name" name="name" reporter:datatype="text" />
9441             <field reporter:label="Year" name="year" reporter:datatype="int" />
9442             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9443             <field reporter:label="Code" name="code" reporter:datatype="text" />
9444             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9445             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9446             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9447             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9448             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9449
9450             <!-- non fund-native fields -->
9451             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9452             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9453             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9454             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9455         </fields>
9456         <links>
9457             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9458             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9459             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9460         </links>
9461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9462             <actions>
9463                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9464             </actions>
9465         </permacrud>
9466         </class>
9467         <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">
9468                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9469                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9470                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9471                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9472                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9473                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9474                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9475                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9476                 </fields>
9477                 <links>
9478                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9479                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9480                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9481                 </links>
9482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9483                         <actions>
9484                                 <create permission="ADMIN_ACQ_FUND">
9485                     <context link="fund" field="org"/>
9486                 </create>
9487                                 <retrieve permission="ADMIN_ACQ_FUND">
9488                     <context link="fund" field="org"/>
9489                 </retrieve>
9490                                 <update permission="ADMIN_ACQ_FUND">
9491                     <context link="fund" field="org"/>
9492                 </update>
9493                                 <delete permission="ADMIN_ACQ_FUND">
9494                     <context link="fund" field="org"/>
9495                 </delete>
9496                         </actions>
9497                 </permacrud>
9498         </class>
9499
9500     <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">
9501         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9502             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9503             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9504             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9505             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9506             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9507             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9508             <field reporter:label="Note" name="note" reporter:datatype="text" />
9509             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9510         </fields>
9511         <links>
9512             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9513             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9514             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9515         </links>
9516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9517                         <actions>
9518                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9519                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9520                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9521                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9522                         </actions>
9523                 </permacrud>
9524     </class>
9525
9526         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9527                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9528                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9529                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9530                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9531                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9532                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9533                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9534                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9535                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9536                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9537                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9538                 </fields>
9539                 <links>
9540                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9541                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9542                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9543                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9544                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9545                 </links>
9546                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9547                         <actions>
9548                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9549                         </actions>
9550                 </permacrud>
9551         </class>
9552
9553         <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">
9554                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9555                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9556                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9557                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9558                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9559                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9560                 </fields>
9561                 <links>
9562                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9563                 </links>
9564                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9565                         <actions>
9566                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9567                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9568                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9569                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9570                         </actions>
9571                 </permacrud>
9572         </class>
9573
9574         <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">
9575                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9576                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9577                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9578                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9579                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9580                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9581                         <field reporter:label="State" name="state" reporter:datatype="text" />
9582                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9583                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9584                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9585                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9586                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9587                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9588                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9589                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9590                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9591                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9592                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9593                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9594                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9595                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9596                 </fields>
9597                 <links>
9598                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9599                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9600                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9601                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9602                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9603                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9604                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9605                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9606                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9607                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9608                 </links>
9609                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9610                         <actions>
9611                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9612                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9613                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9614                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9615                         </actions>
9616                 </permacrud>
9617         </class>
9618
9619         <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">
9620                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9621                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9622                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9623                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9624                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9625                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9626                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9627                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9628                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9629                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9630                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9631                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9632                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9633                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9634                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9635                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9636                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9637                 </fields>
9638                 <links>
9639                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9640                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9641                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9642                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9643                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9644                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9645                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9646                 </links>
9647                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9648             <actions>
9649                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9650             </actions>
9651                 </permacrud>
9652         </class>
9653
9654         <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">
9655                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9656                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9657                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9658                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9659                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9660                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9661                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9662                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9663                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9664                 </fields>
9665                 <links>
9666                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9667                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9668                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9669                 </links>
9670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9671             <actions>
9672                 <create permission="CREATE_PURCHASE_ORDER">
9673                     <context link="purchase_order" field="ordering_agency"/>
9674                 </create>
9675                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9676                     <context link="purchase_order" field="ordering_agency"/>
9677                 </retrieve>
9678                 <update permission="CREATE_PURCHASE_ORDER">
9679                     <context link="purchase_order" field="ordering_agency"/>
9680                 </update>
9681                 <delete permission="CREATE_PURCHASE_ORDER">
9682                     <context link="purchase_order" field="ordering_agency"/>
9683                 </delete>
9684             </actions>
9685                 </permacrud>
9686         </class>
9687
9688         <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">
9689                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9690                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9691                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9692                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9693                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9694                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9695                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9696                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9697                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9698                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9699                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9700                 </fields>
9701                 <links>
9702                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9703                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9704                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9705                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9706                 </links>
9707                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9708             <actions>
9709                 <create permission="CREATE_PURCHASE_ORDER">
9710                     <context link="purchase_order" field="ordering_agency"/>
9711                 </create>
9712                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9713                     <context link="purchase_order" field="ordering_agency"/>
9714                 </retrieve>
9715                 <update permission="CREATE_PURCHASE_ORDER">
9716                     <context link="purchase_order" field="ordering_agency"/>
9717                 </update>
9718                 <delete permission="CREATE_PURCHASE_ORDER">
9719                     <context link="purchase_order" field="ordering_agency"/>
9720                 </delete>
9721             </actions>
9722                 </permacrud>
9723         </class>
9724
9725         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9726                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9727                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9728                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9729                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9730                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9731                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9732                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9733                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9734                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9735                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9736                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9737                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9738                         <field reporter:label="State" name="state" reporter:datatype="text" />
9739                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9740                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9741                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9742                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9743                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9744                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9745                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9746                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9747                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9748                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9749                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9750                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9751                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9752                 </fields>
9753                 <links>
9754                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9755                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9756                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9757                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9758                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9759                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9760                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9761                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9762                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9763                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9764                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9765                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9766                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9767                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9768                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9769                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9770                 </links>
9771                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9772                         <actions>
9773                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9774                                         <context link="purchase_order" field="ordering_agency"/>
9775                                         <context link="picklist" field="org_unit"/>
9776                                 </retrieve>
9777                         </actions>
9778                 </permacrud>
9779         </class>
9780
9781         <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">
9782                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9783                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9784                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9785                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9786                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9787                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9788                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9789                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9790                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9791                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9792                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9793                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9794                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9795                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9796                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9797                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9798                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9799                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9800                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9801                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9802                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9803                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9804                 </fields>
9805                 <links>
9806                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9807                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9808                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9809                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9810                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9811                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9812                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9813                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9814                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9815                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9816                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9817                 </links>
9818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9819                         <actions>
9820                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9821                                         <context link="purchase_order" field="ordering_agency"/>
9822                                         <context link="picklist" field="org_unit"/>
9823                                 </retrieve>
9824                         </actions>
9825                 </permacrud>
9826         </class>
9827
9828         <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">
9829                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9830                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9831                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9832                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9833                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9834                 </fields>
9835                 <links>
9836                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9837                 </links>
9838                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9839                         <actions>
9840                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9841                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9842                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9843                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9844                         </actions>
9845                 </permacrud>
9846         </class>
9847
9848         <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">
9849                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9850                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9851                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9852                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9853                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9854                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9855                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9856                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9857                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9858                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9859                 </fields>
9860                 <links>
9861                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9862                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9863                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9864                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9865                 </links>
9866         </class>
9867
9868         <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">
9869                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9870                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9871                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9872                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9873                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9874                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9875                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9876                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9877                 </fields>
9878                 <links>
9879                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9880                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9881                 </links>
9882         </class>
9883
9884         <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">
9885                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9886                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9887                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9888                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9889                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9890                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9891                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9892                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9893                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9894                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9895                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9896                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9897                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9898                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9899                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9900                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9901                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9902                 </fields>
9903                 <links>
9904                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9905                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9906                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9907                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9908                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9909                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9910                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9911                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9912                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9913                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9914                 </links>
9915         </class>
9916
9917         <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">
9918                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9919                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9920                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9921                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9922                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9923                 </fields>
9924                 <links/>
9925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9926                         <actions>
9927                                 <retrieve />
9928                         </actions>
9929                 </permacrud>
9930         </class>
9931
9932         <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">
9933                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9934                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9935                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9936                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9937                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9938                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9939             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9940                 </fields>
9941                 <links/>
9942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9943             <actions>
9944                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9945                 <retrieve />
9946                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9947                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9948             </actions>
9949         </permacrud>
9950         </class>
9951
9952         <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">
9953                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9954                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9955                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9956                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9957                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9958                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9959                 </fields>
9960                 <links/>
9961         </class>
9962         <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">
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="User" name="usr" reporter:datatype="link" />
9968                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9969                 </fields>
9970                 <links>
9971                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9972                 </links>
9973         </class>
9974
9975         <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">
9976             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9977                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9978                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9979                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9980                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9981                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9982                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9983         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9984
9985             </fields>
9986             <links>
9987                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9988             </links>
9989             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9990                 <actions>
9991                     <create permission="ADMIN_PROVIDER">
9992                         <context link="provider" field="owner"/>
9993                     </create>
9994                     <retrieve permission="ADMIN_PROVIDER">
9995                         <context link="provider" field="owner"/>
9996                     </retrieve>
9997                     <update permission="ADMIN_PROVIDER">
9998                         <context link="provider" field="owner"/>
9999                     </update>
10000                     <delete permission="ADMIN_PROVIDER">
10001                         <context link="provider" field="owner"/>
10002                     </delete>
10003                 </actions>
10004             </permacrud>
10005         </class>
10006         
10007         <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">
10008             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10009                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10010                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10011                 <field reporter:label="Name" name="name" reporter:datatype="text" />
10012                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
10013             </fields>
10014             <links>
10015                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10016             </links>
10017             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10018                 <actions>
10019                     <create permission="ADMIN_PROVIDER">
10020                         <context link="provider" field="owner"/>
10021                     </create>
10022                     <retrieve permission="ADMIN_PROVIDER">
10023                         <context link="provider" field="owner"/>
10024                     </retrieve>
10025                     <update permission="ADMIN_PROVIDER">
10026                         <context link="provider" field="owner"/>
10027                     </update>
10028                     <delete permission="ADMIN_PROVIDER">
10029                         <context link="provider" field="owner"/>
10030                     </delete>
10031                 </actions>
10032             </permacrud>
10033         </class>
10034         
10035         <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">
10036             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10037                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10038                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10039                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10040                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10041                 </fields>
10042                 <links/>
10043         </class>
10044
10045         <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">
10046                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10047                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10048                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
10049                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
10050                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10051                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10052                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10053                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10054                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
10055                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10056                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
10057                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10058                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10059                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10060                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10061                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
10062                 </fields>
10063                 <links>
10064                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10065                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10066                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10067                 </links>
10068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10069             <actions>
10070                 <create permission="ADMIN_PROVIDER">
10071                     <context link="provider" field="owner"/>
10072                 </create>
10073                 <retrieve permission="ADMIN_PROVIDER">
10074                     <context link="provider" field="owner"/>
10075                 </retrieve>
10076                 <update permission="ADMIN_PROVIDER">
10077                     <context link="provider" field="owner"/>
10078                 </update>
10079                 <delete permission="ADMIN_PROVIDER">
10080                     <context link="provider" field="owner"/>
10081                 </delete>
10082             </actions>
10083         </permacrud>
10084         </class>
10085
10086         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10087                 oils_obj:fieldmapper="acq::edi_attr" 
10088                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10089                 <fields oils_persist:primary="key">
10090                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10091                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10092                 </fields>
10093         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10094             <actions>
10095                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10096                 <retrieve/>
10097                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10098                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10099             </actions>
10100         </permacrud>
10101         </class>
10102         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10103                 oils_obj:fieldmapper="acq::edi_attr_set" 
10104                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10105                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10106                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10107                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10108                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10109                 </fields>
10110                 <links>
10111                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10112                 </links>
10113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10114             <actions>
10115                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10116                 <retrieve/>
10117                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10118                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10119             </actions>
10120         </permacrud>
10121         </class>
10122         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10123                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10124                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10125                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10126                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10127                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10128                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10129                 </fields>
10130                 <links>
10131                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10132                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10133                 </links>
10134         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10135             <actions>
10136                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10137                 <retrieve/>
10138                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10139                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10140             </actions>
10141         </permacrud>
10142         </class>
10143
10144
10145         <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">
10146                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10147                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10148                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10149                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10150                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10151                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10152                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10153                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10154                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10155                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10156                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10157                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10158                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10159                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10160                 </fields>
10161                 <links>
10162                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10163                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10164                 </links>
10165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10166             <actions>
10167                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10168                     <context link="account" jump="provider" field="owner"/>
10169                 </retrieve>
10170                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10171                     <context link="account" jump="provider" field="owner"/>
10172                 </update>
10173                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10174                     <context link="account" jump="provider" field="owner"/>
10175                 </delete>
10176             </actions>
10177         </permacrud>
10178         </class>
10179
10180
10181         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10182                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10183                         <field name="id" reporter:datatype="id" />
10184                         <field name="parent" reporter:datatype="link"/>
10185                         <field name="owner" reporter:datatype="link"/>
10186                         <field name="create_time" reporter:datatype="timestamp"/>
10187                         <field name="name" reporter:datatype="text"/>
10188                         <field name="shared" reporter:datatype="bool"/>
10189                         <field name="share_with" reporter:datatype="link"/>
10190                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10191                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10192                 </fields>
10193                 <links>
10194                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10195                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10196                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10197                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10198                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10199                 </links>
10200         </class>
10201         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10202                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10203                         <field name="id" reporter:datatype="id" />
10204                         <field name="parent" reporter:datatype="link"/>
10205                         <field name="owner" reporter:datatype="link"/>
10206                         <field name="create_time" reporter:datatype="timestamp"/>
10207                         <field name="name" reporter:datatype="text"/>
10208                         <field name="shared" reporter:datatype="bool"/>
10209                         <field name="share_with" reporter:datatype="link"/>
10210                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10211                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10212                 </fields>
10213                 <links>
10214                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10215                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10216                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10217                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10218                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10219                 </links>
10220         </class>
10221         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10222                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10223                         <field name="id" reporter:datatype="id" />
10224                         <field name="parent" reporter:datatype="link"/>
10225                         <field name="owner" reporter:datatype="link"/>
10226                         <field name="create_time" reporter:datatype="timestamp"/>
10227                         <field name="name" reporter:datatype="text"/>
10228                         <field name="shared" reporter:datatype="bool"/>
10229                         <field name="share_with" reporter:datatype="link"/>
10230                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10231                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10232                 </fields>
10233                 <links>
10234                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10235                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10236                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10237                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10238                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10239                 </links>
10240         </class>
10241         <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">
10242                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10243                         <field name="id" reporter:datatype="id" />
10244                         <field name="owner" reporter:datatype="link"/>
10245                         <field name="create_time" reporter:datatype="timestamp"/>
10246                         <field name="name" reporter:datatype="text"/>
10247                         <field name="data" reporter:datatype="text"/>
10248                         <field name="folder" reporter:datatype="link"/>
10249                         <field name="description" reporter:datatype="text"/>
10250                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10251                 </fields>
10252                 <links>
10253                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10254                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10255                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10256                 </links>
10257         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10258             <actions>
10259                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10260                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10261                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10262                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10263             </actions>
10264         </permacrud>
10265         </class>
10266         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10267                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10268                         <field name="id" reporter:datatype="id" />
10269                         <field name="owner" reporter:datatype="link"/>
10270                         <field name="create_time" reporter:datatype="timestamp"/>
10271                         <field name="template" reporter:datatype="link"/>
10272                         <field name="data" reporter:datatype="text"/>
10273                         <field name="folder" reporter:datatype="link"/>
10274                         <field name="recur" reporter:datatype="bool"/>
10275                         <field name="recurrence" reporter:datatype="interval"/>
10276                         <field name="name" reporter:datatype="text"/>
10277                         <field name="description" reporter:datatype="text"/>
10278                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10279                 </fields>
10280                 <links>
10281                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10282                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10283                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10284                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10285                 </links>
10286         </class>
10287         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10288                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10289                         <field name="id" reporter:datatype="id" />
10290                         <field name="runner" reporter:datatype="link"/>
10291                         <field name="start_time" reporter:datatype="timestamp"/>
10292                         <field name="complete_time" reporter:datatype="timestamp"/>
10293                         <field name="run_time" reporter:datatype="timestamp"/>
10294                         <field name="email" reporter:datatype="text"/>
10295                         <field name="excel_format" reporter:datatype="bool"/>
10296                         <field name="csv_format" reporter:datatype="bool"/>
10297                         <field name="html_format" reporter:datatype="bool"/>
10298                         <field name="error_code" reporter:datatype="int"/>
10299                         <field name="error_text" reporter:datatype="text"/>
10300                         <field name="report" reporter:datatype="link"/>
10301                         <field name="folder" reporter:datatype="link"/>
10302                         <field name="chart_pie" reporter:datatype="bool"/>
10303                         <field name="chart_bar" reporter:datatype="bool"/>
10304                         <field name="chart_line" reporter:datatype="bool"/>
10305                 </fields>
10306                 <links>
10307                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10308                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10309                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10310                 </links>
10311         </class>
10312         <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">
10313                 <fields oils_persist:primary="id">
10314                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10315                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10316                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10317                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10318                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10319                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10320                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10321                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10322                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10323                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10324                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10325                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10326                 </fields>
10327                 <links>
10328                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10329                 </links>
10330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10331                         <actions>
10332                                 <retrieve />
10333                         </actions>
10334                 </permacrud>
10335         </class>
10336         <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">
10337                 <fields oils_persist:primary="id">
10338                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10339                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10340                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10341                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10342                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10343                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10344                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10345                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10346                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10347                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10348                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10349                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10350                 </fields>
10351                 <links>
10352                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10353                 </links>
10354         </class>
10355         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10356                 <fields oils_persist:primary="id">
10357                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10358                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10359                         <field reporter:label="Fingerprint" name="fingerprint" />
10360                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10361                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10362                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10363                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10364                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10365                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10366                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10367                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10368                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10369                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10370                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10371                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10372                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10373                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10374                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10375                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10376                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10377                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10378                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10379                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10380                 </fields>
10381                 <links>
10382                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10383                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10384                 </links>
10385         </class>
10386         <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">
10387                 <fields oils_persist:primary="id">
10388                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10389                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10390                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10391                 </fields>
10392                 <links>
10393                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10394                 </links>
10395         </class>
10396         <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">
10397                 <fields oils_persist:primary="id">
10398                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10399                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10400                 </fields>
10401                 <links>
10402                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10403                 </links>
10404         </class>
10405         <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">
10406                 <fields oils_persist:primary="id">
10407                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10408                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10409                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10410                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10411                 </fields>
10412                 <links>
10413                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10414                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10415                 </links>
10416         </class>
10417         <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">
10418                 <fields oils_persist:primary="xact">
10419                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10420                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
10421                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10422                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10423                 </fields>
10424                 <links>
10425                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10426                 </links>
10427         </class>
10428         <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">
10429                 <fields oils_persist:primary="xact">
10430                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10431                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
10432                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10433                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10434                 </fields>
10435                 <links>
10436                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10437                 </links>
10438         </class>
10439         <class id="raisv" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::acq_invoice_summary_view" oils_persist:tablename="reporter.acq_invoice_summary_view" reporter:label="Acquisitions Invoice Summary">
10440                 <fields oils_persist:primary="inv_id">
10441                         <field reporter:label="Internal Invoice ID" name="inv_id" reporter:datatype="link"/>
10442                         <field reporter:label="Vendor Invoice ID" name="inv_vendor_ident" reporter:datatype="text"/>
10443                         <field reporter:label="Invoice Date/Time" name="recv_date" reporter:datatype="timestamp"/>
10444                         <field reporter:label="Provider ID" name="provider_id" reporter:datatype="link"/>
10445                         <field reporter:label="Provider Name" name="provider_name" reporter:datatype="text"/>
10446                         <field reporter:label="Provider Code" name="provider_code" reporter:datatype="text"/>
10447                         <field reporter:label="Shipper ID" name="shipper_id" reporter:datatype="link"/>
10448                         <field reporter:label="Shipper Name" name="shipper_name" reporter:datatype="text"/>
10449                         <field reporter:label="Shipper Code" name="shipper_code" reporter:datatype="text"/>
10450                         <field reporter:label="Receiving Org Unit ID" name="receiver_id" reporter:datatype="org_unit"/>
10451                         <field reporter:label="Receiving Org Unit Short (Policy) Name" name="receiver_shortname" reporter:datatype="text"/>
10452                         <field reporter:label="Receiving Org Unit Name" name="receiver_name" reporter:datatype="text"/>
10453                         <field reporter:label="Invoice Payment Authorization" name="payment_auth" reporter:datatype="text"/>
10454                         <field reporter:label="Invoice Payment Method" name="payment_method" reporter:datatype="text"/>
10455                         <field reporter:label="Total Cost Billed" name="total_cost_billed" reporter:datatype="money"/>
10456                         <field reporter:label="Total Actual Cost" name="total_actual_cost" reporter:datatype="money"/>
10457                         <field reporter:label="Total Amount Paid" name="total_amount_paid" reporter:datatype="money"/>
10458                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp"/>
10459                         <field reporter:label="Closing Staff Member (Link)" name="closed_by" reporter:datatype="link"/>
10460                         <field reporter:label="Closing Staff Member Username" name="closed_by_usrname" reporter:datatype="text"/>
10461                 </fields>
10462                 <links>
10463                         <link field="inv_id" reltype="has_a" key="id" map="" class="acqinv"/>
10464                         <link field="provider_id" reltype="has_a" key="id" map="" class="acqpro"/>
10465                         <link field="shipper_id" reltype="might_have" key="id" map="" class="acqpro"/>
10466                         <link field="closed_by" reltype="might_have" key="id" map="" class="au"/>
10467                 </links>
10468         </class>
10469         <class id="raposv" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::acq_purchase_order_summary_view" oils_persist:tablename="reporter.acq_purchase_order_summary_view" reporter:label="Acquisitions Purchase Order Summary">
10470                 <fields oils_persist:primary="id">
10471                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
10472                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10473                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10474                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10475                         <field reporter:label="Creation Date/Time" name="create_time" reporter:datatype="timestamp"/>
10476                         <field reporter:label="Last Edit Date/Time" name="edit_time" reporter:datatype="timestamp"/>
10477                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10478                         <field reporter:label="State" name="state" reporter:datatype="text"/>
10479                         <field reporter:label="Order Date/Time" name="order_date" reporter:datatype="timestamp"/>
10480                         <field reporter:label="Purchase Order Name" name="name" reporter:datatype="timestamp"/>
10481                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10482                         <field reporter:label="Pre-Payment Required?" name="prepayment_required" reporter:datatype="bool"/>
10483                         <field reporter:label="Lineitem Count" name="lineitem_count" reporter:datatype="int"/>
10484                         <field reporter:label="Amount Encumbered" name="amount_encumbered" reporter:datatype="money"/>
10485                         <field reporter:label="Amount Spent" name="amount_spent" reporter:datatype="money"/>
10486                         <field reporter:label="Amount Estimated" name="amount_estimated" reporter:datatype="money"/>
10487                 </fields>
10488                 <links>
10489                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
10490                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10491                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10492                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10493                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10494                         <link field="cancel_reason" reltype="might_have" key="id" map="" class="acqcr"/>
10495                 </links>
10496         </class>
10497         <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)">
10498                 <fields oils_persist:primary="id">
10499                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10500                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10501                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10502                 </fields>
10503                 <links>
10504                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10505                 </links>
10506         </class>
10507         <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">
10508                 <fields oils_persist:primary="id">
10509                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10510                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10511                 </fields>
10512                 <links>
10513                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10514                 </links>
10515         </class>
10516         <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">
10517                 <fields oils_persist:primary="bibid">
10518                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10519                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10520                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10521                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10522                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10523                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10524                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10525                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10526                 </fields>
10527                 <links>
10528                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10529                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10530                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10531                 </links>
10532         </class>
10533         <class id="rcsv" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::copy_statistics_view" oils_persist:tablename="reporter.copy_statistics_view" reporter:label="Item Statistics View">
10534                 <fields oils_persist:primary="copy_id">
10535                         <field reporter:label="Item ID" name="copy_id" reporter:datatype="link"/>
10536                         <field reporter:label="Owning Library Link" name="owning_lib_id" reporter:datatype="link"/>
10537                         <field reporter:label="Consortium: Last Circulation Date" name="consortium_last_circ_date" reporter:datatype="timestamp"/>
10538                         <field reporter:label="System: Last Circulation Date" name="system_last_circ_date" reporter:datatype="timestamp"/>
10539                         <field reporter:label="Branch: Last Circulation Date" name="branch_last_circ_date" reporter:datatype="timestamp"/>
10540                         <field reporter:label="Consortium: Last Checkin Date" name="consortium_last_checkin_date" reporter:datatype="timestamp"/>
10541                         <field reporter:label="System: Last Checkin Date" name="system_last_checkin_date" reporter:datatype="timestamp"/>
10542                         <field reporter:label="Branch: Last Checkin Date" name="branch_last_checkin_date" reporter:datatype="timestamp"/>
10543                         <field reporter:label="Consortium: Last Due Date" name="consortium_last_due_date" reporter:datatype="timestamp"/>
10544                         <field reporter:label="System: Last Due Date" name="system_last_due_date" reporter:datatype="timestamp"/>
10545                         <field reporter:label="Branch: Last Due Date" name="branch_last_due_date" reporter:datatype="timestamp"/>
10546                         <field reporter:label="Consortium: Month-to-Date Circulation" name="consortium_month_to_date_circ" reporter:datatype="int"/>
10547                         <field reporter:label="System: Month-to-Date Circulation" name="system_month_to_date_circ" reporter:datatype="int"/>
10548                         <field reporter:label="Branch: Month-to-Date Circulation" name="branch_month_to_date_circ" reporter:datatype="int"/>
10549                         <field reporter:label="Consortium: Year-to-Date Circulation" name="consortium_year_to_date_circ" reporter:datatype="int"/>
10550                         <field reporter:label="System: Year-to-Date Circulation" name="system_year_to_date_circ" reporter:datatype="int"/>
10551                         <field reporter:label="Branch: Year-to-Date Circulation" name="branch_year_to_date_circ" reporter:datatype="int"/>
10552                         <field reporter:label="Consortium: Lifetime Circulation" name="consortium_lifetime_circ" reporter:datatype="int"/>
10553                         <field reporter:label="System: Lifetime Circulation" name="system_lifetime_circ" reporter:datatype="int"/>
10554                         <field reporter:label="Branch: Lifetime Circulation" name="branch_lifetime_circ" reporter:datatype="int"/>
10555                         <field reporter:label="Consortium: Current Title Hold Count" name="consortium_current_title_hold_count" reporter:datatype="int"/>
10556                         <field reporter:label="System: Current Title Hold Count" name="system_current_title_hold_count" reporter:datatype="int"/>
10557                         <field reporter:label="Branch: Current Title Hold Count" name="branch_current_title_hold_count" reporter:datatype="int"/>
10558                         <field reporter:label="Consortium: Lifetime Title Hold Count" name="consortium_lifetime_holds" reporter:datatype="int"/>
10559                         <field reporter:label="System: Lifetime Title Hold Count" name="system_lifetime_holds" reporter:datatype="int"/>
10560                         <field reporter:label="Branch: Lifetime Title Hold Count" name="branch_lifetime_holds" reporter:datatype="int"/>
10561                         <field reporter:label="Consortium: Lifetime Transits" name="consortium_lifetime_transits" reporter:datatype="int"/>
10562                         <field reporter:label="System: Lifetime Outbound Transits" name="system_lifetime_transits" reporter:datatype="int"/>
10563                         <field reporter:label="Branch: Lifetime Outbound Transits" name="branch_lifetime_transits" reporter:datatype="int"/>
10564                 </fields>
10565                 <links>
10566                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10567                         <link field="owning_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10568                 </links>
10569         </class>
10570         <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">
10571                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10572                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10573                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10574                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10575                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10576                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10577                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10578                 </fields>
10579                 <links>
10580                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10581                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10582                 </links>
10583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10584                         <actions>
10585                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10586                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10587                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10588                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10589                         </actions>
10590                 </permacrud>
10591         </class>
10592         <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">
10593                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10594                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10595                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10596                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10597                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10598                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10599                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10600                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10601                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10602                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10603                 </fields>
10604                 <links>
10605                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10606                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10607                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10608                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10609                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10610                 </links>
10611                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10612                         <actions>
10613                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10614                                         <context link="formula" field="owner"/>
10615                                 </create>
10616                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10617                                         <context link="formula" field="owner"/>
10618                                 </retrieve>
10619                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10620                                         <context link="formula" field="owner"/>
10621                                 </update>
10622                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10623                                         <context link="formula" field="owner"/>
10624                                 </delete>
10625                         </actions>
10626                 </permacrud>
10627         </class>
10628
10629         <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">
10630                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10631                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10632                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10633                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10634                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10635                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10636                 </fields>
10637                 <links>
10638                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10639                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10640                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10641                 </links>
10642                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10643                         <actions>
10644                                 <create permission="CREATE_PURCHASE_ORDER">
10645                                         <context link="formula" field="owner"/>
10646                 </create>
10647                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10648                                         <context link="formula" field="owner"/>
10649                 </retrieve>
10650                                 <update permission="CREATE_PURCHASE_ORDER">
10651                                         <context link="formula" field="owner"/>
10652                 </update>
10653                                 <delete permission="CREATE_PURCHASE_ORDER">
10654                                         <context link="formula" field="owner"/>
10655                 </delete>
10656                         </actions>
10657                 </permacrud>
10658         </class>
10659
10660         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10661                 <fields oils_persist:primary="id">
10662                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10663                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10664                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10665                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10666                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10667                 </fields>
10668                 <links>
10669                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10670                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10671                 </links>
10672         </class>
10673
10674         <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">
10675                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10676                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10677                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10678                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10679                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10680                 </fields>
10681                 <links>
10682                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10683                 </links>
10684                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10685                         <actions>
10686                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10687                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10688                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10689                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10690                         </actions>
10691                 </permacrud>
10692         </class>
10693
10694         <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">
10695                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10696                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10697                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10698                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10699                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10700                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10701                 </fields>
10702                 <links>
10703                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10704                 </links>
10705                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10706                         <actions>
10707                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10708                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10709                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10710                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10711                         </actions>
10712                 </permacrud>
10713         </class>
10714
10715         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10716                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10717                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10718                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10719                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10720                 </fields>
10721                 <links>
10722                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10723                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10724                 </links>
10725         </class>
10726
10727         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10728                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10729                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10730                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10731                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10732                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10733                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10734                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10735                 </fields>
10736                 <links>
10737                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10738                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10739                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10740                 </links>
10741         </class>
10742
10743         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10744                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10745                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10746                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10747                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10748                 </fields>
10749                 <links>
10750                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10751                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10752                 </links>
10753         </class>
10754
10755         <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">
10756                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10757                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10758                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10759                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10760                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10761                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10762                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10763                 </fields>
10764                 <links>
10765                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10766                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10767                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10768                 </links>
10769         </class>
10770
10771         <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">
10772                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10773                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10774                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10775                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10776                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10777                 </fields>
10778                 <links>
10779                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10780                 </links>
10781                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10782             <actions>
10783                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10784                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10785                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10786                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10787             </actions>
10788                 </permacrud>
10789         </class>
10790
10791         <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">
10792                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10793                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10794                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10795                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10796                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10797                 </fields>
10798                 <links>
10799                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10800                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10801                 </links>
10802                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10803                         <actions>
10804                                 <create permission="ADMIN_CLAIM_POLICY">
10805                                         <context link="claim_policy" field="org_unit"/>
10806                 </create>
10807                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10808                                         <context link="claim_policy" field="org_unit"/>
10809                 </retrieve>
10810                                 <update permission="ADMIN_CLAIM_POLICY">
10811                                         <context link="claim_policy" field="org_unit"/>
10812                 </update>
10813                                 <delete permission="ADMIN_CLAIM_POLICY">
10814                                         <context link="claim_policy" field="org_unit"/>
10815                 </delete>
10816                         </actions>
10817                 </permacrud>
10818         </class>
10819
10820     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10821         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10822             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10823             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10824             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10825             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10826             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10827             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10828             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10829             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10830             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10831             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10832             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10833             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10834             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10835             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10836             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10837             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10838                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
10839                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
10840                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
10841         </fields>
10842         <links>
10843             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10844         </links>
10845     </class>
10846
10847     <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">
10848         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10849             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10850             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10851             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10852             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10853             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10854         </fields>
10855     </class>
10856
10857     <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">
10858         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10859             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10860             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10861             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10862             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10863             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10864             <field reporter:label="City" name="city" reporter:datatype="text"/>
10865             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10866             <field reporter:label="State" name="state" reporter:datatype="text"/>
10867             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10868             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10869             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10870         </fields>
10871     </class>
10872
10873     <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">
10874         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10875             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10876             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10877             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10878             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10879             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10880             <field reporter:label="City" name="city" reporter:datatype="text"/>
10881             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10882             <field reporter:label="State" name="state" reporter:datatype="text"/>
10883             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10884             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10885             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10886         </fields>
10887     </class>
10888
10889     <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">
10890         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10891             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10892             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10893             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10894             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10895             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10896             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10897         </fields>
10898     </class>
10899
10900     <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">
10901         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10902             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10903             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10904             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10905             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10906             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10907             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10908         </fields>
10909     </class>
10910
10911         <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">
10912                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10913                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10914                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10915                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10916                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10917                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10918                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10919                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10920                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10921                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10922                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10923                 </fields>
10924                 <links>
10925                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10926                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10927                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10928                 </links>
10929                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10930                         <actions>
10931                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10932                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10933                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10934                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10935                         </actions>
10936                 </permacrud>
10937         </class>
10938
10939         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10940                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10941                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10942                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10943                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10944                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10945                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10946                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10947                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10948                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10949                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10950                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10951                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10952                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10953                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10954                 </fields>
10955                 <links>
10956                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10957                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10958                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10959                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10960                 </links>
10961                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10962                         <actions>
10963                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10964                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10965                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10966                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10967                         </actions>
10968                 </permacrud>
10969         </class>
10970
10971         <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">
10972                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10973                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10974                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10975                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10976                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10977                 </fields>
10978                 <links>
10979                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10980                 </links>
10981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10982                         <actions>
10983                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10984                     <context link="fieldset" field="owning_lib"/>
10985                 </create>
10986                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10987                     <context link="fieldset" field="owning_lib"/>
10988                 </retrieve>
10989                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10990                     <context link="fieldset" field="owning_lib"/>
10991                 </update>
10992                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10993                     <context link="fieldset" field="owning_lib"/>
10994                 </delete>
10995                         </actions>
10996                 </permacrud>
10997         </class>
10998
10999     <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">
11000         <fields>
11001             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11002             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11003             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11004         </fields>
11005                 <links>
11006                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11007                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11008                 </links>
11009     </class>
11010
11011     <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">
11012         <fields>
11013             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11014             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
11015         </fields>
11016                 <links>
11017                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11018                 </links>
11019     </class>
11020
11021     <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">
11022         <fields>
11023             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11024             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11025             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11026         </fields>
11027                 <links>
11028                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11029                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11030                 </links>
11031     </class>
11032
11033     <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">
11034         <fields>
11035             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11036             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
11037         </fields>
11038                 <links>
11039                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11040                 </links>
11041     </class>
11042
11043     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
11044                 <oils_persist:source_definition><![CDATA[
11045
11046             SELECT  DISTINCT l.*
11047               FROM  action.unfulfilled_hold_loops l
11048                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
11049               WHERE l.count = m.max
11050
11051                 ]]></oils_persist:source_definition>
11052         <fields>
11053             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11054             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11055             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11056         </fields>
11057                 <links>
11058                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11059                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11060                 </links>
11061     </class>
11062
11063         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
11064                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
11065                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
11066                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
11067                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
11068                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
11069                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
11070                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
11071                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
11072                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
11073                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
11074                 </fields>
11075                 <links>
11076                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
11077                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
11078                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
11079                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
11080                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
11081                 </links>
11082         </class>
11083
11084         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
11085                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
11086                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
11087                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
11088                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11089                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
11090                 </fields>
11091                 <links>
11092                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
11093                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
11094                 </links>
11095         </class>
11096
11097         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
11098                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11099                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11100                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11101                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11102                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11103                 </fields>
11104                 <links>
11105                 </links>
11106         </class>
11107
11108         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11109                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11110                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11111                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11112                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11113                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11114                 </fields>
11115                 <links>
11116                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11117                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11118                 </links>
11119         </class>
11120         
11121         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11122                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11123                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11124                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11125                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11126                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11127                 </fields>
11128                 <links>
11129                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11130                 </links>
11131         </class>
11132         
11133         <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">
11134                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11135                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11136                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11137                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11138                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11139                 </fields>
11140                 <links>
11141                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11142                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11143                 </links>
11144         </class>
11145
11146         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11147                 <fields oils_persist:primary="name">
11148                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11149                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11150                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11151                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11152                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11153                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11154                 </fields>
11155                 <links>
11156                 </links>
11157         </class>
11158
11159         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11160                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11161                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11162                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11163                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11164                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11165                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11166                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11167                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11168                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11169                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11170                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11171                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11172                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11173                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11174                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11175                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11176                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11177                 </fields>
11178                 <links>
11179                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11180                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11181                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11182                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11183                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11184                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11185                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11186                 </links>
11187         </class>
11188
11189         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11190                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11191                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11192                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11193                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11194                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11195                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11196                 </fields>
11197                 <links>
11198                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11199                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11200                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11201                 </links>
11202         </class>
11203
11204         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11205                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11206                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11207                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11208                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11209                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11210                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11211                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11212                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11213                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11214                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11215                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11216                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11217                 </fields>
11218                 <links>
11219                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11220                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11221                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11222                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11223                 </links>
11224         </class>
11225
11226         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11227                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11228                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11229                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11230                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11231                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11232                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11233                 </fields>
11234                 <links>
11235                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11236                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11237                 </links>
11238         </class>
11239
11240         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11241                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11242                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11243                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11244                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11245                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11246                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11247                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11248                 </fields>
11249                 <links>
11250                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11251                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11252                 </links>
11253         </class>
11254
11255         <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">
11256                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11257                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11258                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11259                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11260                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11261                 </fields>
11262                 <links>
11263                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11264                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11265                 </links>
11266         </class>
11267
11268         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11269                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11270                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11271                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11272                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11273                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11274                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11275                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11276                 </fields>
11277                 <links>
11278                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11279                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11280                 </links>
11281         </class>
11282
11283         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11284                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11285                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11286                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11287                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11288                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11289                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11290                 </fields>
11291                 <links>
11292                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11293                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11294                 </links>
11295         </class>
11296
11297         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11298                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11299                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11300                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11301                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11302                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11303                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11304                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11305                 </fields>
11306                 <links>
11307                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11308                 </links>
11309         </class>
11310
11311         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11312                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11313                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11314                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11315                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11316                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11317                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11318                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11319                 </fields>
11320                 <links>
11321                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11322                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11323                 </links>
11324         </class>
11325
11326         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11327                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11328                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11329                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11330                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11331                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11332                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11333                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11334                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11335                 </fields>
11336                 <links>
11337                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11338                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11339                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11340                 </links>
11341         </class>
11342
11343         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11344                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11345                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11346                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11347                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11348                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11349                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11350                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11351                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11352                 </fields>
11353                 <links>
11354                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11355                 </links>
11356         </class>
11357
11358         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11359                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11360                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11361                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11362                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11363                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11364                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11365                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11366                 </fields>
11367                 <links>
11368                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11369                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11370                 </links>
11371         </class>
11372
11373         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11374                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11375                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11376                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11377                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11378                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11379                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11380                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11381                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11382                 </fields>
11383                 <links>
11384                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11385                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11386                 </links>
11387         </class>
11388
11389         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11390                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11391                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11392                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11393                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11394                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11395                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11396                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11397                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11398                 </fields>
11399                 <links>
11400                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11401                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11402                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11403                 </links>
11404         </class>
11405
11406         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11407                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11408                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11409                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11410                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11411                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11412                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11413                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11414                 </fields>
11415                 <links>
11416                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11417                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11418                 </links>
11419         </class>
11420
11421         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11422                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11423                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11424                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11425                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11426                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11427                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11428                 </fields>
11429                 <links>
11430                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11431                 </links>
11432         </class>
11433
11434         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11435                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11436                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11437                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11438                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11439                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11440                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11441                 </fields>
11442                 <links>
11443                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11444                 </links>
11445         </class>
11446
11447         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11448                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11449                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11450                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11451                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11452                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11453                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11454                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11455                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11456                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11457                 </fields>
11458                 <links>
11459                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11460                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11461                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11462                 </links>
11463         </class>
11464
11465         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11466                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11467                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11468                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11469                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11470                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11471                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11472                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11473                 </fields>
11474                 <links>
11475                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11476                 </links>
11477         </class>
11478
11479         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11480                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11481                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11482                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11483                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11484                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11485                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11486                 </fields>
11487                 <links>
11488                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11489                 </links>
11490         </class>
11491
11492         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11493                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11494                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11495                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11496                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11497                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11498                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11499                 </fields>
11500                 <links>
11501                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11502                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11503                 </links>
11504         </class>
11505
11506         <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">
11507                 <fields oils_persist:primary="id">
11508                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11509                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11510                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11511                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11512                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11513                 </fields>
11514                 <links>
11515                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11516                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11517                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11518                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11519                 </links>
11520         </class>
11521
11522         <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">
11523                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11524                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11525                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11526                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11527                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11528                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11529                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11530                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11531                 </fields>
11532                 <links/>
11533                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11534                         <actions>
11535                                 <retrieve/>
11536                         </actions>
11537                 </permacrud>
11538         </class>
11539
11540         <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">
11541                 <fields oils_persist:primary="ptype_key">
11542                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11543                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11544                 </fields>
11545                 <links/>
11546                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11547                         <actions>
11548                                 <retrieve/>
11549                         </actions>
11550                 </permacrud>
11551         </class>
11552
11553         <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">
11554                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11555                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11556                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11557                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11558                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11559                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11560                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11561                 </fields>
11562                 <links>
11563                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11564                 </links>
11565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11566                         <actions>
11567                                 <retrieve/>
11568                         </actions>
11569                 </permacrud>
11570         </class>
11571
11572         <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">
11573                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11574                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11575                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11576                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11577                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11578                 </fields>
11579                 <links>
11580                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11581                 </links>
11582                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11583                         <actions>
11584                                 <retrieve/>
11585                         </actions>
11586                 </permacrud>
11587         </class>
11588
11589     <class
11590         id="uvs"
11591         controller="open-ils.cstore open-ils.pcrud"
11592         oils_obj:fieldmapper="url_verify::session"
11593         oils_persist:tablename="url_verify.session"
11594         reporter:label="URL Verification Session"
11595     >
11596         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11597             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11598             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11599                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11600             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11601             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11602             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11603             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11604             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11605             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11606         </fields>
11607
11608         <links>
11609             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11610             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11611             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11612             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11613             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11614         </links>
11615
11616         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11617             <actions>
11618                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11619             </actions>
11620         </permacrud>
11621
11622     </class>
11623
11624     <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">
11625         <oils_persist:source_definition><![CDATA[
11626             SELECT
11627                 cbrebi.id AS id,  -- so we can have a pkey in our view
11628                 uvs.id AS session,
11629                 uvs.owning_lib,
11630                 cbrebi.target_biblio_record_entry
11631             FROM url_verify.session uvs
11632             JOIN container.biblio_record_entry_bucket cbreb
11633                 ON (uvs.container = cbreb.id)
11634             JOIN container.biblio_record_entry_bucket_item cbrebi
11635                 ON (cbrebi.bucket = cbreb.id)
11636         ]]></oils_persist:source_definition>
11637         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11638             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11639             <field reporter:label="Session" name="session" reporter:datatype="link" />
11640             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11641             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11642         </fields>
11643         <links>
11644             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11645             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11646             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11647         </links>
11648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11649             <actions>
11650                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11651             </actions>
11652         </permacrud>
11653     </class>
11654
11655     <class
11656         id="uvus"
11657         controller="open-ils.cstore open-ils.pcrud"
11658         oils_obj:fieldmapper="url_verify::url_selector"
11659         oils_persist:tablename="url_verify.url_selector"
11660         reporter:label="URL Verification URL Selector"
11661     >
11662         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11663             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11664             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11665                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11666             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11667         </fields>
11668
11669         <links>
11670             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11671             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11672         </links>
11673
11674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11675             <actions>
11676                 <create permission="URL_VERIFY">
11677                     <context link="session" field="owning_lib"/>
11678                 </create>
11679                 <retrieve permission="URL_VERIFY">
11680                     <context link="session" field="owning_lib"/>
11681                 </retrieve>
11682                 <update permission="URL_VERIFY">
11683                     <context link="session" field="owning_lib"/>
11684                 </update>
11685                 <delete permission="URL_VERIFY">
11686                     <context link="session" field="owning_lib"/>
11687                 </delete>
11688             </actions>
11689         </permacrud>
11690
11691     </class>
11692
11693     <class
11694         id="uvu"
11695         controller="open-ils.cstore open-ils.pcrud"
11696         oils_obj:fieldmapper="url_verify::url"
11697         oils_persist:tablename="url_verify.url"
11698         reporter:label="URL Verification URL"
11699     >
11700         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11701             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11702                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11703                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11704                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11705                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11706             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11707             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11708             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11709             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11710             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11711             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11712             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11713             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11714             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11715             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11716             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11717             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11718             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11719         </fields>
11720
11721         <links>
11722             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11723             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11724             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11725             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11726             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11727         </links>
11728
11729         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11730             <actions>
11731                 <create permission="URL_VERIFY">
11732                     <context link="session" field="owning_lib"/>
11733                 </create>
11734                 <retrieve permission="URL_VERIFY">
11735                     <context link="session" field="owning_lib"/>
11736                 </retrieve>
11737                 <update permission="URL_VERIFY">
11738                     <context link="session" field="owning_lib"/>
11739                 </update>
11740                 <delete permission="URL_VERIFY">
11741                     <context link="session" field="owning_lib"/>
11742                 </delete>
11743             </actions>
11744         </permacrud>
11745
11746     </class>
11747
11748     <class
11749         id="uvva"
11750         controller="open-ils.cstore open-ils.pcrud"
11751         oils_obj:fieldmapper="url_verify::verification_attempt"
11752         oils_persist:tablename="url_verify.verification_attempt"
11753         reporter:label="URL Verification Attempt"
11754     >
11755         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11756             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11757                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11758                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11759             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11760             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11761         </fields>
11762
11763         <links>
11764             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11765             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11766         </links>
11767
11768         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11769             <actions>
11770                 <create permission="URL_VERIFY">
11771                     <context link="session" field="owning_lib"/>
11772                 </create>
11773                 <retrieve permission="URL_VERIFY">
11774                     <context link="session" field="owning_lib"/>
11775                 </retrieve>
11776                 <update permission="URL_VERIFY">
11777                     <context link="session" field="owning_lib"/>
11778                 </update>
11779                 <delete permission="URL_VERIFY">
11780                     <context link="session" field="owning_lib"/>
11781                 </delete>
11782             </actions>
11783         </permacrud>
11784
11785     </class>
11786
11787     <class
11788         id="uvuv"
11789         controller="open-ils.cstore open-ils.pcrud"
11790         oils_obj:fieldmapper="url_verify::url_verification"
11791         oils_persist:tablename="url_verify.url_verification"
11792         reporter:label="URL Verification"
11793     >
11794         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11795             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11796                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11797                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11798             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11799             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11800             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11801             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11802                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11803         </fields>
11804
11805         <links>
11806             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11807             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11808             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11809         </links>
11810
11811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11812             <actions>
11813                 <create permission="URL_VERIFY">
11814                     <context link="attempt" jump="session" field="owning_lib"/>
11815                 </create>
11816                 <retrieve permission="URL_VERIFY">
11817                     <context link="attempt" jump="session" field="owning_lib"/>
11818                 </retrieve>
11819                 <update permission="URL_VERIFY">
11820                     <context link="attempt" jump="session" field="owning_lib"/>
11821                 </update>
11822                 <delete permission="URL_VERIFY">
11823                     <context link="attempt" jump="session" field="owning_lib"/>
11824                 </delete>
11825             </actions>
11826         </permacrud>
11827
11828     </class>
11829
11830         <class
11831                 id="cfdi"
11832                 controller="open-ils.cstore open-ils.pcrud"
11833                 oils_obj:fieldmapper="config::filter_dialog_interface"
11834                 oils_persist:tablename="config.filter_dialog_interface"
11835                 reporter:label="FilterDialog Interface">
11836                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11837                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11838                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11839                 </fields>
11840                 <links>
11841                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11842                 </links>
11843                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11844                         <actions>
11845                                 <retrieve />
11846                         </actions>
11847                 </permacrud>
11848         </class>
11849
11850         <class
11851                 id="cfdfs"
11852                 controller="open-ils.cstore open-ils.pcrud"
11853                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11854                 oils_persist:tablename="config.filter_dialog_filter_set"
11855                 reporter:label="FilterDialog Filter Set">
11856                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11857                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11858                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11859                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11860                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11861                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11862                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11863                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11864                 </fields>
11865                 <links>
11866                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11867                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11868                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11869                 </links>
11870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11871                         <actions>
11872                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11873                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11874                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11875                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11876                         </actions>
11877                 </permacrud>
11878
11879         </class>
11880
11881         <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">
11882                 <fields oils_persist:primary="code">
11883                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11884                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11885                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11886                 </fields>
11887                 <links/>
11888                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11889                         <actions>
11890                                 <retrieve/>
11891                         </actions>
11892                 </permacrud>
11893         </class>
11894
11895         <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">
11896                 <oils_persist:source_definition><![CDATA[
11897
11898             SELECT  b.id,
11899                     MAX(dcp.edit_date) AS last_delete_date
11900              FROM   biblio.record_entry b
11901                     JOIN asset.call_number cn ON (cn.record = b.id)
11902                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11903              WHERE  NOT b.deleted
11904              GROUP BY b.id
11905              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11906
11907                 ]]></oils_persist:source_definition>
11908                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11909                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11910                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11911                 </fields>
11912                 <links>
11913                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11914                 </links>
11915                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11916                         <actions>
11917                                 <retrieve/>
11918                         </actions>
11919                 </permacrud>
11920         </class>
11921
11922         <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">
11923                 <oils_persist:source_definition><![CDATA[
11924
11925             -- -- 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.
11926             -- -- 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
11927             -- -- may not.
11928             -- SELECT
11929             --     bre.id AS bib_id,
11930             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11931             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11932             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11933             -- FROM (
11934                 SELECT
11935                     y.bre AS id,
11936                     COALESCE( x.copy_count, 0 ) AS copy_count,
11937                     y.hold_count AS hold_count,
11938                     (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
11939                 FROM (
11940                         SELECT
11941                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11942                             COUNT(*) AS hold_count
11943                         FROM action.hold_request h
11944                         WHERE
11945                             cancel_time IS NULL
11946                             AND fulfillment_time IS NULL
11947                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11948                         GROUP BY 1
11949                     )y LEFT JOIN (
11950                         SELECT 
11951                             (SELECT id
11952                                 FROM biblio.record_entry 
11953                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11954                             ) AS bre, 
11955                             COUNT(*) AS copy_count
11956                         FROM asset.copy
11957                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11958                         WHERE copy.holdable 
11959                             AND NOT copy.deleted 
11960                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11961                         GROUP BY 1
11962                     )x ON x.bre = y.bre
11963                 -- )z RIGHT JOIN (
11964                 --     SELECT id
11965                 --     FROM biblio.record_entry
11966                 --     WHERE NOT deleted
11967                 -- )bre ON (z.bib_id = bre.id)
11968                 
11969
11970                 ]]></oils_persist:source_definition>
11971                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11972                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11973                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11974                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11975                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11976                 </fields>
11977                 <links>
11978                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11979                 </links>
11980                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11981                         <actions>
11982                                 <retrieve/>
11983                         </actions>
11984                 </permacrud>
11985         </class>
11986
11987         <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">
11988                 <oils_persist:source_definition><![CDATA[
11989             SELECT *,
11990                 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,
11991                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11992             FROM
11993                 (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
11994                     FROM
11995                         action.hold_request ahr
11996                         JOIN reporter.hold_request_record rhrr USING (id)
11997                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11998                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11999                     WHERE
12000                         ahr.cancel_time IS NULL
12001                         AND ahr.fulfillment_time IS NULL
12002                     GROUP BY bib_record, pickup_lib
12003                 )x
12004                 JOIN
12005                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12006                     FROM
12007                         action.hold_request ahr
12008                         JOIN reporter.hold_request_record rhrr USING (id)
12009                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12010                     WHERE
12011                         ahr.cancel_time IS NULL
12012                         AND ahr.fulfillment_time IS NULL
12013                     GROUP BY bib_record
12014                 )y
12015                 USING (id)
12016                 ]]></oils_persist:source_definition>
12017                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12018                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12019                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
12020                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
12021                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
12022                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12023                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12024                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
12025                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12026                 </fields>
12027                 <links>
12028                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12029                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
12030                 </links>
12031                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12032                         <actions>
12033                                 <retrieve/>
12034                         </actions>
12035                 </permacrud>
12036         </class>
12037
12038         <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) ">
12039                 <oils_persist:source_definition><![CDATA[
12040             WITH counts_at_ou AS (
12041                 SELECT  rhrr.bib_record AS id,
12042                         aou.id AS pickup_lib_or_desc,
12043                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
12044                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
12045                   FROM  actor.org_unit aou
12046                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
12047                         action.hold_request ahr
12048                         JOIN reporter.hold_request_record rhrr USING (id)
12049                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12050                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
12051                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
12052                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
12053                         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
12054                   GROUP BY 1, 2
12055             )
12056             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
12057                    y.holds_everywhere, y.copy_count_everywhere,
12058                 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,
12059                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
12060             FROM counts_at_ou x
12061                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12062                     FROM
12063                         action.hold_request ahr
12064                         JOIN reporter.hold_request_record rhrr USING (id)
12065                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12066                     WHERE
12067                         ahr.cancel_time IS NULL
12068                         AND ahr.fulfillment_time IS NULL
12069                     GROUP BY bib_record
12070                 )y
12071                 USING (id)
12072                 ]]></oils_persist:source_definition>
12073                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12074                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12075                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
12076                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
12077                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
12078                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12079                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12080                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
12081                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12082                 </fields>
12083                 <links>
12084                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12085                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
12086                 </links>
12087                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12088                         <actions>
12089                                 <retrieve/>
12090                         </actions>
12091                 </permacrud>
12092         </class>
12093
12094         <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">
12095                 <oils_persist:source_definition><![CDATA[
12096             SELECT
12097                 ac.id,
12098                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12099                 MAX(actac.xact_start) AS last_circ
12100             FROM asset.copy ac
12101                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12102             GROUP BY ac.id
12103
12104             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12105             --SELECT
12106             --    ac.id,
12107             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12108             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12109             --FROM asset.copy ac
12110             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12111             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12112             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12113                 ]]></oils_persist:source_definition>
12114                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12115                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12116                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12117                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12118                 </fields>
12119                 <links>
12120                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12121                 </links>
12122                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12123                         <actions>
12124                                 <retrieve/>
12125                         </actions>
12126                 </permacrud>
12127         </class>
12128
12129         <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">
12130                 <fields oils_persist:primary="id">
12131                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12132                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12133                 </fields>
12134                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12135                         <actions>
12136                                 <retrieve/>
12137                         </actions>
12138                 </permacrud>
12139         </class>
12140
12141         <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">
12142                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12143                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12144                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12145                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12146                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12147                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12148                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12149                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12150                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12151                 </fields>
12152                 <links>
12153                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12154                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12155                 </links>
12156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12157                         <actions>
12158                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12159                                 <retrieve/>
12160                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12161                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12162                         </actions>
12163                 </permacrud>
12164         </class>
12165
12166         <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">
12167                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12168                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12169                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12170                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12171                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12172                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12173                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12174                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12175                 </fields>
12176                 <links>
12177                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12178                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12179                 </links>
12180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12181                         <actions>
12182                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12183                                 <retrieve/>
12184                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12185                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12186                         </actions>
12187                 </permacrud>
12188         </class>
12189
12190
12191         <!-- ********************************************************************************************************************* -->
12192         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12193         <!-- ********************************************************************************************************************* -->
12194         <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">
12195                 <fields oils_persist:primary="id">
12196                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12197                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12198                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12199                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12200                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12201                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12202                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12203                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12204                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12205                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12206                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12207                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12208                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12209                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12210                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12211                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12212                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12213                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12214                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12215                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12216                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12217                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12218                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12219                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12220                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12221                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12222                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12223                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12224                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12225                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12226                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12227                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12228                 </fields>
12229                 <links>
12230                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12231                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12232                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12233                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12234                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12235                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12236                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12237                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12238                 </links>
12239         </class>
12240
12241         <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">
12242                 <fields oils_persist:primary="id">
12243                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12244                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12245                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12246                 </fields>
12247                 <links>
12248                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12249                 </links>
12250         </class>
12251
12252         <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">
12253                 <fields oils_persist:primary="id">
12254                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12255                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12256                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12257                 </fields>
12258                 <links>
12259                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12260                 </links>
12261         </class>
12262
12263         <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">
12264                 <fields oils_persist:primary="id">
12265                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12266
12267                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12268                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12269                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12270
12271                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12272                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12273                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12274
12275                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12276                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12277
12278                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12279                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12280                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12281
12282                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12283                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12284
12285                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12286                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12287                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12288
12289                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12290                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12291                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12292
12293                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12294                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12295                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12296                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12297
12298                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12299                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12300
12301                 </fields>
12302                 <links>
12303                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12304                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12305                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12306                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12307                 </links>
12308         </class>
12309
12310         <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">
12311                 <oils_persist:source_definition><![CDATA[
12312
12313             SELECT
12314                 po.ordering_agency AS ordering_agency,
12315                 po.id AS purchase_order,
12316                 li.id AS lineitem,
12317                 lid.id AS lineitem_detail,
12318                 cpa.id AS claim_policy_action
12319             FROM
12320                 acq.lineitem_detail lid
12321                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12322                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12323                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12324                 JOIN acq.claim_policy_action cpa ON (
12325                     cpa.claim_policy = cp.id
12326
12327                     -- we only care about claim policy actions whose claim
12328                     -- interval we'd reached or exceeded
12329                     AND (NOW() - cpa.action_interval) > po.order_date
12330
12331                     -- filter out all claim policy actions where claim events
12332                     -- have occurred on or after the action's action_interval
12333                     AND NOT EXISTS (
12334                         SELECT 1
12335                         FROM
12336                             acq.claim_event evt
12337                             JOIN acq.claim claim ON (
12338                                 claim.id = evt.claim
12339                                 AND claim.lineitem_detail = lid.id
12340                             )
12341                         WHERE
12342                             evt.event_date >= (po.order_date + cpa.action_interval)
12343                     )
12344                 )
12345             WHERE
12346                 lid.cancel_reason IS NULL
12347                 AND li.cancel_reason IS NULL -- belt/suspenders
12348                 AND po.cancel_reason IS NULL -- belt/suspenders
12349                 AND lid.recv_time IS NULL
12350                 AND po.state = 'on-order'
12351             ORDER BY 1, 2, 3, 4, 5
12352
12353                 ]]></oils_persist:source_definition>
12354                 <fields>
12355                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12356                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12357                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12358                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12359                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12360                 </fields>
12361                 <links>
12362                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12363                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12364                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12365                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12366                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12367                 </links>
12368         </class>
12369         <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">
12370                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12371                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12372                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12373                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12374                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12375                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12376                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12377                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12378                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12379                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12380                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12381                 </fields>
12382                 <links>
12383                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12384                 </links>
12385     </class>
12386         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12387                 <oils_persist:source_definition><![CDATA[
12388             SELECT * FROM acq.lineitem_summary 
12389                                 WHERE item_count > (invoice_count + cancel_count)
12390         ]]></oils_persist:source_definition>
12391                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12392                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12393                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12394                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12395                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12396                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12397                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12398                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12399                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12400                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12401                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12402                 </fields>
12403                 <links>
12404                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12405                 </links>
12406     </class>
12407         <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">
12408                 <oils_persist:source_definition><![CDATA[
12409
12410                         SELECT  t.*
12411                           FROM  action.transit_copy t
12412                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12413                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12414                           WHERE s.parent_ou <> d.parent_ou
12415
12416                 ]]></oils_persist:source_definition>
12417                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12418                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12419                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12420                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12421                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12422                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12423                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12424                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12425                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12426                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12427                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12428                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12429                 </fields>
12430                 <links>
12431                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12432                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12433                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12434                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12435                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12436                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12437                 </links>
12438         </class>
12439
12440     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12441                 <oils_persist:source_definition><![CDATA[
12442
12443         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12444                 SELECT
12445                         cp.id as copy,
12446                         COUNT(circ.id),
12447                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12448                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12449                 FROM
12450                         asset.copy cp
12451                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12452                 GROUP BY 1, 3, 4
12453                 UNION ALL
12454                 SELECT
12455                         cp.id as copy,
12456                         COUNT(circ.id),
12457                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12458                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12459                 FROM
12460                         asset.copy cp
12461                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12462                 GROUP BY 1, 3, 4
12463                 UNION ALL
12464                 SELECT
12465                         id as copy,
12466                         circ_count,
12467                         -1 AS year,
12468                         false as is_renewal
12469                 FROM
12470                         extend_reporter.legacy_circ_count
12471         )x GROUP BY 1, 3, 4
12472
12473                 ]]></oils_persist:source_definition>
12474         <fields>
12475             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12476             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12477             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12478             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12479         </fields>
12480                 <links>
12481                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12482                 </links>
12483                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12484                         <actions>
12485                                 <retrieve/>
12486                         </actions>
12487                 </permacrud>
12488     </class>
12489
12490         <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">
12491                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12492                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12493                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12494                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12495                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12496                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12497                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12498                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12499                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12500                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12501                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12502                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12503                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12504                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12505                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12506                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12507                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12508                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12509                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12510                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12511                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12512                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12513                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12514                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12515                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12516                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12517                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12518                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12519                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12520                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12521                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12522                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
12523                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
12524                 </fields>
12525                 <links>
12526                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12527                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12528                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12529                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12530                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12531                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12532                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12533                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12534                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12535                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12536                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12537                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12538                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12539                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12540                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12541                 </links>
12542         </class>
12543
12544     <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">
12545         <fields oils_persist:primary="id">
12546             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12547             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12548             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12549             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12550             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12551             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12552             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12553             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12554             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12555             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12556             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12557             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12558             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12559             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12560             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12561             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12562             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12563             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12564             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12565             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12566             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12567             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12568             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12569             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12570             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12571             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12572             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12573             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12574             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12575             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12576             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12577             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12578             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12579             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12580         </fields>
12581         <links>
12582             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12583             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12584             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12585             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12586             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12587             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12588             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12589             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12590         </links>
12591     </class>
12592
12593     <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">
12594         <fields oils_persist:primary="id">
12595             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12596             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12597             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12598             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12599         </fields>
12600         <links>
12601             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12602             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12603         </links>
12604     </class>
12605
12606     <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">
12607         <fields oils_persist:primary="owning_lib">
12608             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12609             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12610             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12611         </fields>
12612         <links>
12613             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12614         </links>
12615     </class>
12616
12617     <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">
12618         <fields oils_persist:primary="id">
12619             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12620             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12621             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12622             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12623             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12624         </fields>
12625         <links>
12626             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12627             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12628             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12629         </links>
12630     </class>
12631
12632     <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">
12633         <fields oils_persist:primary="circ_lib">
12634             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12635             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12636             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12637             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12638         </fields>
12639         <links>
12640             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12641             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12642         </links>
12643     </class>
12644
12645     <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">
12646         <fields oils_persist:primary="id">
12647             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12648             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12649             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12650             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12651             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12652         </fields>
12653         <links>
12654             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12655             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12656             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12657         </links>
12658     </class>
12659
12660     <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">
12661         <fields oils_persist:primary="home_ou">
12662             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12663             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12664             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12665             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12666         </fields>
12667         <links>
12668             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12669             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12670         </links>
12671     </class>
12672         <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">
12673                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12674                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12675                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12676                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12677                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12678                 </fields>
12679                 <links>
12680                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12681                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12682                 </links>
12683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12684                         <actions>
12685                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12686                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12687                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12688                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12689                         </actions>
12690                 </permacrud>
12691         </class>
12692         <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">
12693                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12694                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12695                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12696                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12697                 </fields>
12698                 <links>
12699                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12700                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12701                         </links>
12702                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12703                 <actions>
12704                                 <create permission="ADMIN_ACQ_FUND_TAG">
12705                                         <context link="tag" field="owner"/>
12706                                 </create>
12707                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12708                                         <context link="tag" field="owner"/>
12709                                 </retrieve>
12710                                 <update permission="ADMIN_ACQ_FUND_TAG">
12711                                         <context link="tag" field="owner"/>
12712                                 </update>
12713                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12714                                         <context link="tag" field="owner"/>
12715                                 </delete>
12716                         </actions>
12717                 </permacrud>
12718         </class>
12719         <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">
12720                 <oils_persist:source_definition><![CDATA[
12721                 SELECT
12722                         poi.purchase_order AS purchase_order,
12723                         ii.invoice AS invoice,
12724                         NULL AS lineitem,
12725                         poi.id AS po_item,
12726                         NULL AS picklist
12727                 FROM
12728                         acq.po_item poi
12729                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12730                 UNION SELECT
12731                         jub.purchase_order AS purchase_order,
12732                         ie.invoice AS invoice,
12733                         jub.id AS lineitem,
12734                         NULL AS po_item,
12735                         jub.picklist AS picklist
12736                 FROM
12737                         acq.lineitem jub
12738                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12739                 UNION SELECT
12740                         ii.purchase_order AS purchase_order,
12741                         ii.invoice AS invoice,
12742                         NULL AS lineitem,
12743                         NULL AS po_item,
12744                         NULL AS picklist
12745                 FROM
12746                         acq.invoice_item ii
12747                 WHERE ii.po_item IS NULL
12748                 UNION SELECT
12749                         ie.purchase_order AS purchase_order,
12750                         ie.invoice AS invoice,
12751                         NULL AS lineitem,
12752                         NULL AS po_item,
12753                         NULL AS picklist
12754                 FROM
12755                         acq.invoice_entry ie
12756                 WHERE ie.lineitem IS NULL
12757                 UNION SELECT
12758                         NULL AS purchase_order,
12759                         NULL AS invoice,
12760                         jub.id AS lineitem,
12761                         NULL AS po_item,
12762                         jub.picklist AS picklist
12763                 FROM
12764                         acq.lineitem jub
12765                 WHERE jub.purchase_order IS NULL
12766                 ]]></oils_persist:source_definition>
12767                 <fields>
12768                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12769                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12770                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12771                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12772                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12773                 </fields>
12774                 <links>
12775                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12776                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12777                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12778                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12779                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12780                 </links>
12781         </class>
12782         <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">
12783                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12784                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12785                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12786                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12787                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12788                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12789                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12790                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12791                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12792                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12793                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12794                 </fields>
12795                 <links>
12796                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12797                 </links>
12798                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12799                         <actions>
12800                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12801                                 <retrieve/>
12802                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12803                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12804                         </actions>
12805                 </permacrud>
12806         </class>
12807
12808         <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">
12809                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12810                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12811                         <field name="date_applied" reporter:datatype="timestamp"/>
12812                         <field name="org" reporter:datatype="org_unit"/>
12813                         <field name="original_value" reporter:datatype="text"/>
12814                         <field name="new_value" reporter:datatype="text"/>
12815                         <field name="field_name" reporter:datatype="link"/>
12816                 </fields>
12817                 <links>
12818                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12819                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12820                 </links>
12821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12822                         <actions>
12823                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12824                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12825                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12826                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12827                         </actions>
12828                 </permacrud>
12829         </class>
12830         <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">
12831                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12832                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12833                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12834                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12835                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12836                 </fields>
12837                 <links>
12838                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12839                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12840                 </links>
12841         </class>
12842         <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">
12843                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12844                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12845                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12846                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12847                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12848                 </fields>
12849                 <links>
12850                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12851                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12852                 </links>
12853         </class>
12854         <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">
12855                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12856                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12857                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12858                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
12859                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12860                 </fields>
12861                 <links>
12862                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12863                 </links>
12864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12865                         <actions>
12866                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12867                                 <retrieve/>
12868                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12869                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12870                         </actions>
12871                 </permacrud>
12872         </class>
12873         <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">
12874                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12875                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12876                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
12877                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
12878                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
12879                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12880                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
12881                 </fields>
12882                 <links>
12883                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12884                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12885                 </links>
12886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12887                         <actions>
12888                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12889                                 <retrieve/>
12890                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12891                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12892                         </actions>
12893                 </permacrud>
12894         </class>
12895         <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">
12896                 <fields oils_persist:primary="code">
12897                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12898                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12899                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12900                 </fields>
12901                 <links>
12902                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12903                 </links>
12904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12905                         <actions>
12906                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12907                                 <retrieve/>
12908                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12909                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12910                         </actions>
12911                 </permacrud>
12912         </class>
12913         <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">
12914                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12915                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12916                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12917                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12918                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12919                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12920                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12921                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12922                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
12923                 </fields>
12924                 <links>
12925                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12926                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12927                 </links>
12928                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12929                         <actions>
12930                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12931                                 <retrieve/>
12932                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12933                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12934                         </actions>
12935                 </permacrud>
12936         </class>
12937         <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">
12938                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12939                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12940                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12941                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12942                 </fields>
12943                 <links>
12944                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12945                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12946                 </links>
12947                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12948                         <actions>
12949                                 <create permission="UPDATE_COPY">
12950                     <context link="copy" field="circ_lib"/>
12951                 </create>
12952                                 <retrieve/>
12953                                 <update permission="UPDATE_COPY">
12954                     <context link="copy" field="circ_lib"/>
12955                 </update>
12956                                 <delete permission="UPDATE_COPY">
12957                     <context link="copy" field="circ_lib"/>
12958                 </delete>
12959                         </actions>
12960                 </permacrud>
12961         </class>
12962         <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">
12963         <oils_persist:source_definition><![CDATA[
12964         SELECT ahcm.target_copy AS id,count(*) AS count
12965          FROM
12966          action.hold_request ahr,
12967          action.hold_copy_map ahcm
12968          WHERE
12969          ahr.cancel_time IS NULL AND
12970          ahr.fulfillment_time IS NULL AND
12971          ahr.capture_time IS NULL AND
12972          ahr.id = ahcm.hold
12973          GROUP BY ahcm.target_copy
12974         ]]></oils_persist:source_definition>
12975         <fields oils_persist:primary="id">
12976             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12977             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12978         </fields>
12979         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12980             <actions>
12981                <retrieve/>
12982             </actions>
12983         </permacrud>
12984         </class>
12985
12986         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
12987                 oils_obj:fieldmapper="config::workstation_setting_type" 
12988                 oils_persist:tablename="config.workstation_setting_type" 
12989                 reporter:label="Workstation Setting Type">
12990                 <fields oils_persist:primary="name">
12991                         <field name="name" reporter:datatype="text"/>
12992                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
12993                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
12994                         <field name="datatype" reporter:datatype="text"/>
12995                         <field name="fm_class" reporter:datatype="text"/>
12996                         <field name="grp" reporter:datatype="link"/>
12997                 </fields>
12998                 <links>
12999                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
13000                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
13001                 </links>
13002                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13003                         <actions>
13004                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13005                                 <retrieve/>
13006                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13007                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13008                         </actions>
13009                 </permacrud>
13010         </class>
13011
13012         <!-- no pcrud access is granted for now, because it's assumed these
13013                          setting values will be applied and retrived via the API. -->
13014         <class id="awss" 
13015                 controller="open-ils.cstore"
13016                 oils_obj:fieldmapper="actor::workstation_setting" 
13017                 oils_persist:tablename="actor.workstation_setting" 
13018                 reporter:label="Workstation Setting">
13019                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
13020                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
13021                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
13022                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13023                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
13024                 </fields>
13025                 <links>
13026                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
13027                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
13028                 </links>
13029         </class>
13030
13031         <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">
13032         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
13033                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
13034                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
13035                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
13036         </fields>
13037         </class>
13038
13039         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
13040                 oils_obj:fieldmapper="config::print_template" 
13041                 oils_persist:tablename="config.print_template" 
13042                 reporter:label="Print Templates">
13043                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
13044                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
13045                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
13046                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
13047                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
13048                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13049                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
13050                         <field name="content_type" reporter:datatype="text"/>
13051                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
13052                 </fields>
13053                 <links>
13054                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13055                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
13056                 </links>
13057                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13058                         <actions>
13059                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13060                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
13061                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13062                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13063                         </actions>
13064                 </permacrud>
13065         </class>
13066
13067         <class id="cct" 
13068                 controller="open-ils.cstore open-ils.pcrud"
13069                 oils_obj:fieldmapper="config::carousel_type" 
13070                 oils_persist:tablename="config.carousel_type" 
13071                 reporter:label="Carousel Types">
13072                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
13073                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
13074                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13075                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
13076                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
13077                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
13078                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
13079                 </fields>
13080                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13081                         <actions>
13082                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13083                                 <retrieve/>
13084                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13085                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13086                         </actions>
13087                 </permacrud>
13088         </class>
13089
13090         <class id="cc" 
13091                 controller="open-ils.cstore open-ils.pcrud"
13092                 oils_obj:fieldmapper="container::carousel" 
13093                 oils_persist:tablename="container.carousel" 
13094                 reporter:label="Carousels">
13095                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
13096                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13097                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
13098                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13099                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13100                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13101                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13102                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13103                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13104                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13105                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13106                         <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 -->
13107                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13108                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13109                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13110                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13111                 </fields>
13112                 <links>
13113                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13114                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13115                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13116                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13117                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13118                 </links>
13119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13120                         <actions>
13121                                 <create permission="ADMIN_CAROUSEL" global_required="true"/>
13122                                 <retrieve/>
13123                                 <update permission="ADMIN_CAROUSEL" global_required="true"/>
13124                                 <delete permission="ADMIN_CAROUSEL" global_required="true"/>
13125                         </actions>
13126                 </permacrud>
13127         </class>
13128
13129         <class id="ccou" 
13130                 controller="open-ils.cstore open-ils.pcrud"
13131                 oils_obj:fieldmapper="container::carousel_org_unit" 
13132                 oils_persist:tablename="container.carousel_org_unit" 
13133                 reporter:label="Carousels Visible at Library">
13134                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13135                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13136                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13137                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13138                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13139                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13140                 </fields>
13141                 <links>
13142                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13143                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13144                 </links>
13145                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13146                         <actions>
13147                                 <create permission="ADMIN_CAROUSEL" global_required="true"/>
13148                                 <retrieve/>
13149                                 <update permission="ADMIN_CAROUSEL" global_required="true"/>
13150                                 <delete permission="ADMIN_CAROUSEL" global_required="true"/>
13151                         </actions>
13152                 </permacrud>
13153         </class>
13154
13155         <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">
13156                 <fields oils_persist:primary="name">
13157                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13158                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13159                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13160                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13161                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13162                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13163                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13164                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13165                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13166                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13167                 </fields>
13168                 <links>
13169                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13170                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13171                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13172                 </links>
13173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13174                         <actions>
13175                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13176                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13177                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13178                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13179                         </actions>
13180                 </permacrud>
13181         </class>
13182
13183         <class id="coauf" 
13184                 controller="open-ils.cstore open-ils.pcrud"
13185                 oils_obj:fieldmapper="config::openathens_uid_field" 
13186                 oils_persist:tablename="config.openathens_uid_field" 
13187                 reporter:label="OpenAthens unique identifiers">
13188                 <fields oils_persist:primary="id" oils_persist:sequence="config.openathens_uid_field_id_seq">
13189                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id" />
13190                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13191                 </fields>
13192                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13193                         <actions>
13194                                 <retrieve/>
13195                         </actions>
13196                 </permacrud>
13197         </class>
13198
13199         <class id="coanf" 
13200                 controller="open-ils.cstore open-ils.pcrud"
13201                 oils_obj:fieldmapper="config::openathens_name_field" 
13202                 oils_persist:tablename="config.openathens_name_field" 
13203                 reporter:label="OpenAthens name fields">
13204                 <fields oils_persist:primary="id" oils_persist:sequence="config.openathens_name_field_id_seq">
13205                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id" />
13206                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13207                 </fields>
13208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13209                         <actions>
13210                                 <retrieve/>
13211                         </actions>
13212                 </permacrud>
13213         </class>
13214
13215         <class id="coai" 
13216                 controller="open-ils.cstore open-ils.pcrud"
13217                 oils_obj:fieldmapper="config::openathens_identity" 
13218                 oils_persist:tablename="config.openathens_identity" 
13219                 reporter:label="Sign-on to OpenAthens">
13220                 <fields oils_persist:primary="id" oils_persist:sequence="config.openathens_identity_id_seq">
13221                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13222                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
13223                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13224                         <field reporter:label="API key" name="api_key" reporter:datatype="text" oils_obj:required="true"/>
13225                         <field reporter:label="Connection ID" name="connection_id" reporter:datatype="text" oils_obj:required="true"/>
13226                         <field reporter:label="Connection URI" name="connection_uri" reporter:datatype="text" oils_obj:required="true"/>
13227                         <field reporter:label="Auto sign-on" name="auto_signon_enabled" reporter:datatype="bool"/>
13228                         <field reporter:label="Auto sign-out" name="auto_signout_enabled" reporter:datatype="bool"/>
13229                         <field reporter:label="Unique identifier field" name="unique_identifier" reporter:datatype="link" oils_obj:required="true"/>
13230                         <field reporter:label="Display name field" name="display_name" reporter:datatype="link" oils_obj:required="true"/>
13231                         <field reporter:label="Release prefix" name="release_prefix" reporter:datatype="bool"/>
13232                         <field reporter:label="Release first name" name="release_first_given_name" reporter:datatype="bool"/>
13233                         <field reporter:label="Release middle name" name="release_second_given_name" reporter:datatype="bool"/>
13234                         <field reporter:label="Release surname" name="release_family_name" reporter:datatype="bool"/>
13235                         <field reporter:label="Release suffix" name="release_suffix" reporter:datatype="bool"/>
13236                         <field reporter:label="Release email" name="release_email" reporter:datatype="bool"/>
13237                         <field reporter:label="Release home library" name="release_home_ou" reporter:datatype="bool"/>
13238                 </fields>
13239                 <links>
13240                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13241                         <link field="unique_identifier" reltype="has_a" key="id" map="" class="coauf"/>
13242                         <link field="display_name" reltype="has_a" key="id" map="" class="coanf"/>
13243                 </links>
13244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13245                         <actions>
13246                                 <create permission="ADMIN_OPENATHENS" global_required="true"/>
13247                                 <retrieve/>
13248                                 <update permission="ADMIN_OPENATHENS" global_required="true"/>
13249                                 <delete permission="ADMIN_OPENATHENS" global_required="true"/>
13250                         </actions>
13251                 </permacrud>
13252         </class>
13253
13254         <!-- ********************************************************************************************************************* -->
13255 </IDL>
13256
13257 <!--
13258     vim:noet:ts=4:sw=4:
13259 -->