]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1695007 All-circulations slim DB VIEW
[Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
808                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
809                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
810                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
811                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
812                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
813                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
814                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
815                 </fields>
816                 <links>
817                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
818                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
819                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
820                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
821                 </links>
822         </class>
823
824     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
825         <fields oils_persist:primary="name">
826             <field reporter:label="Name" name="name" reporter:datatype="text"/>
827             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
828             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
829             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
830         </fields>
831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
832             <actions>
833                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
834                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
835                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
836                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
837             </actions>
838         </permacrud>
839     </class>
840
841     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
842         <fields oils_persist:primary="id">
843             <field reporter:label="ID" name="id" reporter:datatype="id"/>
844             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
845             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
846             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
847             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
848         </fields>
849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
850             <actions>
851                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
852                 <retrieve/>
853                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
854                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
855             </actions>
856         </permacrud>
857     </class>
858
859         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
860                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
861                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
862                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
863                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
864                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
865                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
866                 </fields>
867                 <links>
868                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
869                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
870                 </links>
871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
872             <actions>
873                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
874                 <retrieve/>
875                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
876                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
877             </actions>
878         </permacrud>
879         </class>
880
881         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
882                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
883                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
884                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
885                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
886         </fields>
887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
888             <actions>
889                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
890                 <retrieve/>
891                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
892                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
893             </actions>
894         </permacrud>
895         </class>
896
897         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
898                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
899                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
900                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
901                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
902                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
903                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
904                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
905                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
906                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
907                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
908                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
909                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
910         </fields>
911                 <links>
912                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
913                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
914         </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
918                 <retrieve/>
919                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
920                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
928                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
929                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
930                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
931                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
933                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
934                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
935                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
936                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
937         </fields>
938                 <links>
939                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
940                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
941         </links>
942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
943             <actions>
944                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
945                 <retrieve/>
946                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
947                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
948             </actions>
949         </permacrud>
950         </class>
951
952         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
953                 <fields oils_persist:primary="name">
954                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
955                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
956                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
957                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
958                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
959                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
960                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
961                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
962                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
963                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
964                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
965                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
966                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
967                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
968                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
969                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
970                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
971                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
972                 </fields>
973                 <links>
974                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
975                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
976                 </links>
977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
978             <actions>
979                 <create permission="ADMIN_SVF" global_required="true"/>
980                 <retrieve/>
981                 <update permission="ADMIN_SVF" global_required="true"/>
982                 <delete permission="ADMIN_SVF" global_required="true"/>
983             </actions>
984         </permacrud>
985         </class>
986
987         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
988                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
990                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
991                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
992             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
993                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
994                 </fields>
995                 <links/>
996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
997             <actions>
998                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
999                 <retrieve/>
1000                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1001                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1002             </actions>
1003         </permacrud>
1004         </class>
1005
1006         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1007                 <fields oils_persist:primary="coded_value">
1008                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1009                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1010                 </fields>
1011                 <links>
1012                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1013                 </links>
1014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1015             <actions>
1016                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1017                 <retrieve/>
1018                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1019                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1020             </actions>
1021         </permacrud>
1022         </class>
1023
1024         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1025                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1026                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1027                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1028                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1029                 </fields>
1030                 <links>
1031                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1032                 </links>
1033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1034             <actions>
1035                 <retrieve/>
1036             </actions>
1037         </permacrud>
1038         </class>
1039
1040
1041         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1042                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1043                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1044                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1045                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1046                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1047                 </fields>
1048                 <links>
1049                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1050                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1051                 </links>
1052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1053             <actions>
1054                 <retrieve/>
1055             </actions>
1056         </permacrud>
1057         </class>
1058
1059
1060         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1061                 <fields oils_persist:primary="source">
1062                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1063                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1064                 </fields>
1065                 <links>
1066                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1067                 </links>
1068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1069             <actions>
1070                 <retrieve/>
1071             </actions>
1072         </permacrud>
1073         </class>
1074
1075         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1076                 <fields>
1077                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1078                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1079                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1080                 </fields>
1081                 <links>
1082                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1083                 </links>
1084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085             <actions>
1086                 <retrieve/>
1087             </actions>
1088         </permacrud>
1089         </class>
1090
1091         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1092                 <fields oils_persist:primary="id">
1093                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1094                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1095                 </fields>
1096                 <links>
1097                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
1107                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1108                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1109                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1110                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1111                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1112                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1113                 </fields>
1114                 <links>
1115                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1116                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1117                 </links>
1118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1119             <actions>
1120                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1121                 <retrieve/>
1122                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1123                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1124             </actions>
1125         </permacrud>
1126         </class>
1127
1128         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
1129                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1130                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1131                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1132                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1133                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1134                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1135                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1136                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1137             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1138             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1139             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1140                 </fields>
1141                 <links>
1142                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1143                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1144                 </links>
1145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1146             <actions>
1147                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1148                 <retrieve/>
1149                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1150                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1151             </actions>
1152         </permacrud>
1153         </class>
1154
1155         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
1156                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1157                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1158                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1159                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1160                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1161                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1162                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1163                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1164                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1165                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1166                 </fields>
1167                 <links>
1168                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1169                 </links>
1170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1171             <actions>
1172                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1173                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1174                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1175                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1176             </actions>
1177         </permacrud>
1178         </class>
1179
1180     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
1181         <fields oils_persist:primary="name">
1182             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1183             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1185             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1186             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1187             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1188             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1189             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1190             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1191             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1192         </fields>
1193         <links>
1194             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1195             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1196         </links>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1200                 <retrieve/>
1201                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1202                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1203             </actions>
1204         </permacrud>
1205     </class>
1206
1207     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1208         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1209             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1210             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1211             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1212             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1213             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1214             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1215             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1216         </fields>
1217         <links>
1218             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1219         </links>
1220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1221             <actions>
1222                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1223                 <retrieve/>
1224                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1225                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1226             </actions>
1227         </permacrud>
1228     </class>
1229
1230     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1231                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1232                         oils_persist:tablename="config.z3950_index_field_map" 
1233                         reporter:label="Z39.50 Index Field Map">
1234         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1235             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1236             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1237             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1238             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1239             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1240             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1241         </fields>
1242         <links>
1243             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1244             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1245             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1246         </links>
1247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1248             <actions>
1249                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250                 <retrieve/>
1251                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1252                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1253             </actions>
1254         </permacrud>
1255     </class>
1256
1257
1258         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
1259                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1260                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1261                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1262                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1263                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1264                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1265                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1266                 </fields>
1267                 <links>
1268             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1269             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1270                 </links>
1271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1272                         <actions>
1273                                 <retrieve/>
1274                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1275                         </actions>
1276                 </permacrud>
1277         </class>
1278
1279         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
1280                 <fields oils_persist:primary="key">
1281                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1282                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1283                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1284                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1285                 </fields>
1286                 <links/>
1287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1288                         <actions>
1289                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1290                                 <retrieve/>
1291                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1292                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1293                         </actions>
1294                 </permacrud>
1295         </class>
1296
1297         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1298                 <fields oils_persist:primary="module">
1299                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1301                 </fields>
1302                 <links/>
1303         </class>
1304
1305         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1306                 <fields oils_persist:primary="module">
1307                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1308                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1309                 </fields>
1310                 <links/>
1311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1312                         <actions>
1313                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1314                                 <retrieve/>
1315                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1316                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1317                         </actions>
1318                 </permacrud>
1319         </class>
1320
1321         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1322                 <fields oils_persist:primary="module">
1323                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1324                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1325                 </fields>
1326                 <links/>
1327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1328                         <actions>
1329                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1330                                 <retrieve/>
1331                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1332                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1333                         </actions>
1334                 </permacrud>
1335         </class>
1336
1337         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1338                 <fields oils_persist:primary="module">
1339                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1340                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1341                 </fields>
1342                 <links/>
1343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1344                         <actions>
1345                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1346                                 <retrieve/>
1347                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1348                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1349                         </actions>
1350                 </permacrud>
1351         </class>
1352
1353         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1354                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1355                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1356                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1357                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1358                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1359                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1360                 </fields>
1361                 <links>
1362                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1363                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1364                 </links>
1365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1366                         <actions>
1367                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1368                     <context link="event_def" field="owner"/>
1369                 </create>
1370                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1371                     <context link="event_def" field="owner"/>
1372                 </retrieve>
1373                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1374                     <context link="event_def" field="owner"/>
1375                 </update>
1376                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1377                     <context link="event_def" field="owner"/>
1378                 </delete>
1379                         </actions>
1380                 </permacrud>
1381         </class>
1382
1383         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1384                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1385                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1386                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1387                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1388                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1389                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1390                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1391                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1392                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1393                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1394                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1395                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1396                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1397                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1398                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1399                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1400                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1401                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1402                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1403                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1404                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1405                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1406                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1407                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1408                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1409                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1410                 </fields>
1411                 <links>
1412                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1413                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1414                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1415                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1416                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1417                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1418                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1419                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1420                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1421                 </links>
1422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1423                         <actions>
1424                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1425                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1426                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1427                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1428                         </actions>
1429                 </permacrud>
1430         </class>
1431
1432         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1433                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1434                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1435                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1436                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1437                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1438                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1439                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1440                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1441                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1442                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1443                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1444                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1445                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1446                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1447                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1448                 </fields>
1449                 <links>
1450                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1451                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1452                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1453                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1454                 </links>
1455         </class>
1456
1457         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1458                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1459                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1460                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1461                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1462                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1463                 </fields>
1464                 <links>
1465                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1466                 </links>
1467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1468                         <actions>
1469                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1470                     <context link="event_def" field="owner"/>
1471                 </create>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1473                     <context link="event_def" field="owner"/>
1474                 </retrieve>
1475                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1476                     <context link="event_def" field="owner"/>
1477                 </update>
1478                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1479                     <context link="event_def" field="owner"/>
1480                 </delete>
1481                         </actions>
1482                 </permacrud>
1483         </class>
1484
1485         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1486                 <oils_persist:source_definition><![CDATA[
1487                 SELECT  atevdef.hook,
1488                         atevdef.name,
1489                         atevdef.reactor,
1490                         atev.id,
1491                         atev.event_def,
1492                         atev.add_time,
1493                         atev.run_time,
1494                         atev.start_time,
1495                         atev.update_time,
1496                         atev.complete_time,
1497                         atev.update_process,
1498                         atev.state,
1499                         atev.user_data,
1500                         atev.template_output,
1501                         atev.error_output,
1502                         atev.async_output,
1503                         targ_circ.id AS target_circ,
1504                         targ_ahr.id AS target_hold,
1505                         COALESCE(
1506                                 targ_circ.circ_lib,
1507                                 targ_ahr.pickup_lib
1508                         ) AS perm_lib
1509                 FROM action_trigger.event atev
1510                 JOIN action_trigger.event_definition atevdef ON
1511                         (atevdef.id = atev.event_def)
1512                 JOIN action_trigger.hook ath ON
1513                         (ath.key = atevdef.hook)
1514                 LEFT JOIN action.circulation targ_circ ON
1515                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1516                 LEFT JOIN action.hold_request targ_ahr ON
1517                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1518                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1519                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1520                                 'circ.staff.max_visible_event_age',
1521                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1522                         ) UNION
1523                         SELECT '1000 YEARS'::INTERVAL AS value
1524                 ) ous)
1525                 ]]></oils_persist:source_definition>
1526                 <fields oils_persist:primary="id">
1527                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1528                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1529                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1530                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1531                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1532                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1533                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1534                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1535                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1536                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1537                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1538                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1539                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1540                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1541                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1542                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1543                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1544                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1545                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1546                 </fields>
1547                 <links>
1548                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1549                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1550                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1551                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1552                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1553                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1554                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1555                 </links>
1556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557                         <actions>
1558                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1559                         </actions>
1560                 </permacrud>
1561         </class>
1562
1563         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1564                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1565                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1566                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1567                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1568                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1569                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1570                 </fields>
1571                 <links>
1572                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1573                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1574                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1575                 </links>
1576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1577                         <actions>
1578                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1579                         </actions>
1580                 </permacrud>
1581         </class>
1582
1583         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1584                 <fields oils_persist:primary="code">
1585                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1586                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1587                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1588                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1589                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1590                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1591                 </fields>
1592                 <links/>
1593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1594             <actions>
1595                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1596                 <retrieve/>
1597                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1598                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1599             </actions>
1600         </permacrud>
1601         </class>
1602
1603         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1604                 <fields oils_persist:primary="code">
1605                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1606                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1607                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1608                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1609                 </fields>
1610                 <links/>
1611         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1612             <actions>
1613                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1614                 <retrieve/>
1615                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1616                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1617             </actions>
1618         </permacrud>
1619         </class>
1620
1621         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1622                 <fields oils_persist:primary="code">
1623                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1624                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1625                 </fields>
1626                 <links/>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1630                 <retrieve/>
1631                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1632                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1633             </actions>
1634         </permacrud>
1635         </class>
1636
1637         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1638                 <fields oils_persist:primary="code">
1639                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1640                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1641                 </fields>
1642                 <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1648                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651         </class>
1652
1653         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1654                 <fields oils_persist:primary="code">
1655                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1656                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1657                 </fields>
1658                 <links/>
1659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660             <actions>
1661                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1662                 <retrieve/>
1663                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1664                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1665             </actions>
1666         </permacrud>
1667         </class>
1668
1669         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1670                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1671                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1672                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1673                 </fields>
1674                 <links/>
1675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1676             <actions>
1677                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1678                 <retrieve/>
1679                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1680                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1681             </actions>
1682         </permacrud>
1683         </class>
1684
1685         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1686                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1687                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1688                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1689                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1690                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1691                 </fields>
1692         <links>
1693             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1694             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1695             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1696         </links>
1697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1698             <actions>
1699                 <create permission="UPDATE_COPY">
1700                     <context link="target_copy" field="circ_lib"/>
1701                 </create>
1702                 <retrieve/>
1703                 <update permission="UPDATE_COPY">
1704                     <context link="target_copy" field="circ_lib"/>
1705                 </update>
1706                 <delete permission="UPDATE_COPY">
1707                     <context link="target_copy" field="circ_lib"/>
1708                 </delete>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1714                 <fields oils_persist:primary="code">
1715                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1730                 <fields oils_persist:primary="code">
1731                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1733                 </fields>
1734                 <links/>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1740                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1741             </actions>
1742         </permacrud>
1743         </class>
1744
1745         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1746                 <fields oils_persist:primary="code">
1747                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1748                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1749                 </fields>
1750                 <links/>
1751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1752             <actions>
1753                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1754                 <retrieve/>
1755                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1756                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1757             </actions>
1758         </permacrud>
1759         </class>
1760
1761     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1762         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1763             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1764             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1765             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1766             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1767             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1768             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1769             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1770             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1771             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1772             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1773             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1774             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1775             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1776             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1777             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1778             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1779             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1780         </fields>
1781         <links/>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1787                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790     </class>
1791
1792     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1793         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1794             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1795             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1796             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1797             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1798             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1799             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1800             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1801             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1802             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1803             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1804             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1805             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1806             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1807             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1808             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1809             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1810             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1811             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1812             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1813         </fields>
1814         <links/>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1818                 <retrieve/>
1819                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1820                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1821             </actions>
1822         </permacrud>
1823     </class>
1824
1825     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1826         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1827             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1828             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1829             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1830             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1831             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1832         </fields>
1833         <links>
1834             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1835             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1836             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1837         </links>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1841                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1842                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1843                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1844             </actions>
1845         </permacrud>
1846     </class>
1847
1848         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1850                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1851                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1852                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1853                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1854                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1855                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1856                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1857                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1858                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1859                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1860                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1861                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1862                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1863                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1864                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1865                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1866             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1867                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1868                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1869                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1870                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1871                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1872                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1873                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1874                 </fields>
1875                 <links>
1876                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1877                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1878                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1879                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1880                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1881                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1882                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1883                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1884                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1885                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1886                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1887                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1888                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1889             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1890                 </links>
1891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1892             <actions>
1893                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1894                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1895                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1896                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1897             </actions>
1898         </permacrud>
1899         </class>
1900
1901         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1902                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1903                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1904                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1905                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1906                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1907                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1908                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1909                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1910                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1911                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1912                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1913                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1914                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1915                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1916                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1917                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1918             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1919                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1920                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1921             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1922                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1923                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1924                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1925                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1926             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1927             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1928             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1929                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1930                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1931                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1932                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1933                 </fields>
1934                 <links>
1935                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1936                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1937                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1938                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1939                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1940                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1941                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1942                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1943                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1944                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1945                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1946                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1947                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1948                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1949             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1950                 </links>
1951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1952             <actions>
1953                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1954                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1955                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1956                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1957             </actions>
1958         </permacrud>
1959         </class>
1960
1961     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1962         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1963             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1964             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1965             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1966         </fields>
1967         <links/>
1968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1969             <actions>
1970                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1971                 <retrieve/>
1972                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1973                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1974             </actions>
1975         </permacrud>
1976     </class>
1977
1978     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1979         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1980             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1981             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1982             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1983             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1984             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1985             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1986             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1987         </fields>
1988         <links>
1989             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1990         </links>
1991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1992             <actions>
1993                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1994                 <retrieve/>
1995                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1996                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1997             </actions>
1998         </permacrud>
1999     </class>
2000
2001     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
2002         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2003             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2004             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2005             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2006             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2007             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2008         </fields>
2009         <links>
2010             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2011             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2012         </links>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2016                     <context link="matchpoint" field="org_unit"/>
2017                 </create>
2018                 <retrieve/>
2019                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2020                     <context link="matchpoint" field="org_unit"/>
2021                 </update>
2022                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2023                     <context link="matchpoint" field="org_unit"/>
2024                 </delete>
2025             </actions>
2026         </permacrud>
2027     </class>
2028
2029     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
2030         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2031             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2032             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2033             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2034         </fields>
2035         <links>
2036             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2037             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2038         </links>
2039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2040             <actions>
2041                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2042                     <context link="limit_set" field="owning_lib"/>
2043                 </create>
2044                 <retrieve/>
2045                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2046                     <context link="limit_set" field="owning_lib"/>
2047                 </update>
2048                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2049                     <context link="limit_set" field="owning_lib"/>
2050                 </delete>
2051             </actions>
2052         </permacrud>
2053     </class>
2054     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
2055         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2056             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2057             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2058             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2059         </fields>
2060         <links>
2061             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2062             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2063         </links>
2064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2065             <actions>
2066                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="limit_set" field="owning_lib"/>
2068                 </create>
2069                 <retrieve/>
2070                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2071                     <context link="limit_set" field="owning_lib"/>
2072                 </update>
2073                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2074                     <context link="limit_set" field="owning_lib"/>
2075                 </delete>
2076             </actions>
2077         </permacrud>
2078     </class>
2079
2080     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
2081         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2082             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2083             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2084             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2085             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2086         </fields>
2087         <links>
2088             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2089             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2090         </links>
2091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2092             <actions>
2093                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2094                     <context link="limit_set" field="owning_lib"/>
2095                 </create>
2096                 <retrieve/>
2097                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2098                     <context link="limit_set" field="owning_lib"/>
2099                 </update>
2100                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2101                     <context link="limit_set" field="owning_lib"/>
2102                 </delete>
2103             </actions>
2104         </permacrud>
2105     </class>
2106
2107         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
2108                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2109                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2110                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2111                 </fields>
2112                 <links/>
2113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2114             <actions>
2115                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2116                 <retrieve/>
2117                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2118                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2119             </actions>
2120         </permacrud>
2121         </class>
2122
2123         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
2124                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2125                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2126                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2127                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2128                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2129                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2130                 </fields>
2131                 <links>
2132                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2133                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2134                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2135                 </links>
2136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137             <actions>
2138                 <create permission="ADMIN_SURVEY">
2139                     <context link="survey" field="owner"/>
2140                 </create>
2141                 <retrieve/>
2142                 <update permission="ADMIN_SURVEY">
2143                     <context link="survey" field="owner"/>
2144                 </update>
2145                 <delete permission="ADMIN_SURVEY">
2146                     <context link="survey" field="owner"/>
2147                 </delete>
2148             </actions>
2149         </permacrud>
2150         </class>
2151         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="">
2153                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2154                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2155                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2156                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2157                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2158                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2159                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2160                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2161                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2162                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2163                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2164                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2165                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2166                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2167                 </fields>
2168                 <links>
2169                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2170                 </links>
2171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2172                         <actions>
2173                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2174                                         <context link="usr" field="home_ou" />
2175                                 </retrieve>
2176                         </actions>
2177                 </permacrud>
2178         </class>
2179         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
2180                 <fields oils_persist:primary="id" oils_persist:sequence="">
2181                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2182                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2183                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2184                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2185                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2186                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2187                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2188                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2189                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2190                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2191                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2192                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2193                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2194                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2195                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2196                 </fields>
2197                 <links>
2198                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2199                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2200                 </links>
2201         </class>
2202         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2204                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2205                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2206                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2207                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2208                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2209                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2210                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2211                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2212                 </fields>
2213                 <links>
2214                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2215                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2216                 </links>
2217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2218                         <actions> <!-- created magically, so no create action -->
2219                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2220                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2221                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2222                         </actions>
2223                 </permacrud>
2224         </class>
2225         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2226                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2227                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2228                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2230                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2231                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2232                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2233                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2234                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2235                 </fields>
2236                 <links>
2237                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2238                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2239                 </links>
2240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2241                         <actions> <!-- created magically, so no create action -->
2242                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2243                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2244                         </actions>
2245                 </permacrud>
2246         </class>
2247         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2249                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2251                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2253                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2260                 </links>
2261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262             <actions>
2263                 <create permission="UPDATE_USER" context_field="owner">
2264                     <context link="usr" field="home_ou"/>
2265                 </create>
2266                                 <!-- note: public notes are still accessible via API -->
2267                 <retrieve permission="UPDATE_USER">
2268                     <context link="usr" field="home_ou"/>
2269                                 </retrieve>
2270                 <update permission="UPDATE_USER">
2271                     <context link="usr" field="home_ou"/>
2272                                 </update>
2273                 <delete permission="UPDATE_USER">
2274                     <context link="usr" field="home_ou"/>
2275                                 </delete>
2276             </actions>
2277         </permacrud>
2278         </class>
2279         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2281                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2282                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2283                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2284                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2285                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2286                 </fields>
2287                 <links>
2288                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2289                 </links>
2290         </class>
2291         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2293                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2294                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2295                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2296                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2297                 </fields>
2298                 <links>
2299                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2300                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2301                 </links>
2302         </class>
2303         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
2304                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2305                         <field name="field" reporter:datatype="link"/>
2306                         <field name="id" reporter:datatype="id" />
2307                         <field name="source" reporter:datatype="link"/>
2308                         <field name="value" reporter:datatype="text"/>
2309                 </fields>
2310                 <links>
2311                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2312                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2313                 </links>
2314         </class>
2315         <class id="aihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2316                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2317                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2318                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2319                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2320                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2321                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2322                 </fields>
2323                 <links>
2324                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2325                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2326                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2327                 </links>
2328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2329                         <actions>
2330                                 <retrieve/>
2331                         </actions>
2332                 </permacrud>
2333         </class>
2334         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2335                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2336                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2337                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2338                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2339                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2340                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2341                 </fields>
2342                 <links>
2343                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2344                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2345                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2346                 </links>
2347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2348                         <actions>
2349                                 <retrieve/>
2350                         </actions>
2351                 </permacrud>
2352         </class>
2353         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
2354                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2355                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2356                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2357                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2358                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2359                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2360                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2361                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2362                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2363                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2364                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2365                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2366                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2367                 </fields>
2368                 <links>
2369                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2370                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2371                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2372                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2373                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2374                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2375                 </links>
2376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2377             <actions>
2378                 <create permission="TRANSIT_COPY" context_field="owner">
2379                     <context link="target_copy" field="circ_lib"/>
2380                 </create>
2381                 <retrieve/>
2382                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2383                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2384             </actions>
2385         </permacrud>
2386         </class>
2387         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
2388                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2389                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2390                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2391                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2392                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2393                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2394                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2395                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2396                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2397                 </fields>
2398                 <links>
2399                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2400                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2401                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2402                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2403                 </links>
2404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405             <actions>
2406                 <create permission="ADMIN_SURVEY">
2407                     <context link="survey" field="owner"/>
2408                 </create>
2409                 <retrieve permission="VIEW_USER">
2410                     <context link="usr" field="home_ou"/>
2411                 </retrieve>
2412                 <update permission="ADMIN_SURVEY">
2413                     <context link="survey" field="owner"/>
2414                 </update>
2415                 <delete permission="ADMIN_SURVEY">
2416                     <context link="survey" field="owner"/>
2417                 </delete>
2418             </actions>
2419         </permacrud>
2420         </class>
2421         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2422                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2423                         <field name="bucket" />
2424                         <field name="id" reporter:datatype="id" />
2425                         <field name="target_copy" reporter:datatype="link"/>
2426                         <field name="create_time" reporter:datatype="timestamp" />
2427                         <field name="pos" reporter:datatype="int" />
2428                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2429                 </fields>
2430                 <links>
2431                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2432                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2433             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2434                 </links>
2435         </class>
2436         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
2437                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2438                         <field name="id" reporter:datatype="id" />
2439                         <field name="item" reporter:datatype="link"/>
2440                         <field name="note" reporter:datatype="text" />
2441                 </fields>
2442                 <links>
2443                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2444                 </links>
2445         </class>
2446
2447         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2448                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2449                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2450                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2451                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2452                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2453                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2454                 </fields>
2455                 <links>
2456                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2457                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2458                 </links>
2459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2460                         <actions>
2461                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2462                                 <retrieve/>
2463                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2464                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2465                         </actions>
2466                 </permacrud>
2467         </class>
2468
2469         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2470                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2471                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2472                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2473                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2474                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2475                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2476                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2477                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2478                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2479                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2480                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2481                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2482                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2483                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2484                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2485                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2486                 </fields>
2487                 <links>
2488                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2489                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2490                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2491                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2492                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2493                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2494                 </links>
2495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2496                         <actions>
2497                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2498                                 <retrieve/>
2499                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2500                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2501                         </actions>
2502                 </permacrud>
2503         </class>
2504
2505         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2506                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2507                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2508                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2509                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2510                 </fields>
2511                 <links>
2512                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2513                 </links>
2514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2515                         <actions>
2516                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2517                                 <retrieve/>
2518                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2519                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2520                         </actions>
2521                 </permacrud>
2522         </class>
2523
2524         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2525                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2526                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2527                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2528                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2529                 </fields>
2530                 <links>
2531                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2532                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2533                 </links>
2534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2535                         <actions>
2536                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2537                                 <retrieve/>
2538                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2539                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2540                         </actions>
2541                 </permacrud>
2542         </class>
2543
2544         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2545                 <fields oils_persist:primary="code">
2546                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2547                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2548                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2549                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2550                 </fields>
2551                 <links>
2552                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2553                 </links>
2554                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2555                         <actions>
2556                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2557                                 <retrieve/>
2558                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2559                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2560                         </actions>
2561                 </permacrud>
2562         </class>
2563
2564         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
2565                 <fields oils_persist:primary="code">
2566                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2567                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2568                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2569                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2570                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2571                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2572                 </fields>
2573                 <links>
2574                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2575                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2576                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2577                 </links>
2578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2579                         <actions>
2580                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2581                                 <retrieve/>
2582                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2583                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2584                         </actions>
2585                 </permacrud>
2586         </class>
2587
2588     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
2589         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2590             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2591             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2592             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2593         </fields>
2594         <links>
2595             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2596             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2597         </links>
2598         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2599             <actions>
2600                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2601                 <retrieve/>
2602                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2603                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2604             </actions>
2605         </permacrud>
2606     </class>
2607
2608         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
2609                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2610                         <field name="active" reporter:datatype="bool"/>
2611                         <field name="create_date" reporter:datatype="timestamp"/>
2612                         <field name="creator" />
2613                         <field name="deleted" reporter:datatype="bool"/>
2614                         <field name="edit_date" reporter:datatype="timestamp"/>
2615                         <field name="editor" />
2616                         <field name="id" reporter:datatype="id" />
2617                         <field name="last_xact_id" />
2618                         <field name="marc" />
2619                         <field name="source" />
2620                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2621                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2622                         <field name="heading" />
2623                         <field name="simple_heading" />
2624                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2625                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2626                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2627                 </fields>
2628                 <links>
2629                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2630                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2631                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2632                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2633                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2634                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2635                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2636                 </links>
2637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2638                         <actions>
2639                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2640                                 <retrieve/>
2641                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2642                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2643                         </actions>
2644                 </permacrud>
2645         </class>
2646         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2647                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2648                         <field name="char_encoding" />
2649                         <field name="id" />
2650                         <field name="record" />
2651                         <field name="record_status" />
2652                         <field name="thesaurus" />
2653                 </fields>
2654                 <links>
2655                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2656                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2657                 </links>
2658         </class>
2659         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2660                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2661                         <field name="id" reporter:datatype="id" />
2662                         <field name="bib" reporter:datatype="link" />
2663                         <field name="authority" reporter:datatype="link" />
2664                 </fields>
2665                 <links>
2666                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2667                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2668                 </links>
2669         </class>
2670         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2671                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2672                         <field name="id" reporter:datatype="id" />
2673                         <field name="record" reporter:datatype="link" />
2674                         <field name="atag" reporter:datatype="link" />
2675                         <field name="value" reporter:datatype="text" />
2676                 </fields>
2677                 <links>
2678                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2679                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2680                 </links>
2681         </class>
2682         <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
2683                 <fields oils_persist:primary="code" oils_persist:sequence="">
2684                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2685                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2686                 </fields>
2687                 <links/>
2688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2689             <actions>
2690                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2691                 <retrieve/>
2692                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2693                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2694             </actions>
2695         </permacrud>
2696         </class>
2697         <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2698                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2699                         <field name="accepting_usr" />
2700                         <field name="amount" reporter:datatype="money" />
2701                         <field name="amount_collected" reporter:datatype="money" />
2702                         <field name="approval_code" reporter:datatype="text"/>
2703                         <field name="cash_drawer" reporter:datatype="link"/>
2704                         <field name="cc_number" reporter:datatype="text"/>
2705                         <field name="cc_order_number" reporter:datatype="text"/>
2706                         <field name="cc_processor" reporter:datatype="text"/>
2707                         <field name="id" reporter:datatype="id" />
2708                         <field name="note" reporter:datatype="text"/>
2709                         <field name="payment_ts" reporter:datatype="timestamp"/>
2710                         <field name="xact" reporter:datatype="link"/>
2711                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2712                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2713                 </fields>
2714                 <links>
2715                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2716                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2717                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2718                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2719                 </links>
2720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2721             <actions>
2722                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2723                     <context link="xact" jump="usr" field="home_ou"/>
2724                 </retrieve>
2725                         </actions>
2726                 </permacrud>
2727         </class>
2728         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">
2729                 <fields oils_persist:primary="name">
2730                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2731                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2732                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2733                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2734                 </fields>
2735                 <links/>
2736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2737             <actions>
2738                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2739                 <retrieve/>
2740                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2741                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2742             </actions>
2743         </permacrud>
2744         </class>
2745
2746         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2747                 <fields oils_persist:primary="alias">
2748                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2749                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2750                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2751                 </fields>
2752                 <links>
2753                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2754                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2755                 </links>
2756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2757             <actions>
2758                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2759                 <retrieve/>
2760                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2761                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2762             </actions>
2763         </permacrud>
2764         </class>
2765
2766         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2767                 <fields oils_persist:primary="name">
2768                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2769                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2770                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2771                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2772                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2773                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2774                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2775                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2776                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2777                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2778                 </fields>
2779                 <links>
2780                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2781                 </links>
2782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2783             <actions>
2784                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2785                 <retrieve/>
2786                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2787                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2788             </actions>
2789         </permacrud>
2790         </class>
2791
2792         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
2793                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2794                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2795                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2796                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2797                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2798                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2799                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2800                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2801                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2802                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2803                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2804                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2805                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2806                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2807                 </fields>
2808                 <links>
2809                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2810                 </links>
2811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2812             <actions>
2813                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2814                 <retrieve/>
2815                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2816                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2817             </actions>
2818         </permacrud>
2819         </class>
2820         <class id="cbho" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::best_hold_order" oils_persist:tablename="config.best_hold_order" reporter:label="Best-Hold Sort Order">
2821                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2822                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2823                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2824                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2825                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2826                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2827                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2828                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2829                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2830                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2831                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2832                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2833                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2834                 </fields>
2835                 <links>
2836                 </links>
2837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2838                         <actions>
2839                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2840                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2841                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2842                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2843                         </actions>
2844                 </permacrud>
2845         </class>
2846         <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
2847                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2848                         <field name="id" reporter:datatype="id" />
2849                         <field name="name" reporter:datatype="text"/>
2850                         <field name="xpath" reporter:datatype="text"/>
2851                         <field name="format" reporter:datatype="link"/>
2852                         <field name="first_word" reporter:datatype="bool" />
2853                 </fields>
2854                 <links/>
2855         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2856             <actions>
2857                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2858                 <retrieve/>
2859                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2860                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2861             </actions>
2862         </permacrud>
2863         </class>
2864         <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">
2865                 <fields oils_persist:primary="code" oils_persist:sequence="">
2866                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2867                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2868                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2869                 </fields>
2870                 <links/>
2871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2872             <actions>
2873                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2874                 <retrieve/>
2875                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2876                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2877             </actions>
2878         </permacrud>
2879         </class>
2880         <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">
2881                 <fields oils_persist:primary="code" oils_persist:sequence="">
2882                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2883                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2884                 </fields>
2885                 <links/>
2886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2887             <actions>
2888                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2889                 <retrieve/>
2890                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2891                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2892             </actions>
2893         </permacrud>
2894         </class>
2895     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
2896         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2897             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2898             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2899             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2900             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2901         </fields>
2902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2903             <actions>
2904                 <retrieve/>
2905             </actions>
2906         </permacrud>
2907     </class>
2908         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
2909                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2910                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2911                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2912                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2913                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2914                 </fields>
2915                 <links>
2916                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2917                 </links>
2918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2919             <actions>
2920                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2921                 <retrieve/>
2922                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2923                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2924             </actions>
2925         </permacrud>
2926         </class>
2927         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
2928                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2929                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2930                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2931                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2932                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2933                 </fields>
2934                 <links>
2935                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2936                 </links>
2937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2938             <actions>
2939                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2940                 <retrieve/>
2941                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2942                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2943             </actions>
2944         </permacrud>
2945         </class>
2946         <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">
2947                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2948                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2949                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2950                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2951                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2952                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2953                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2954                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2955                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2956                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2957                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2958                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2959                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2960                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2961                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2962                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2963                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2964                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2965                 </fields>
2966                 <links>
2967                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2968                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2969                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2970                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2971                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2972                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2973                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2974                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2975                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2976                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2977                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2978                 </links>
2979         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2980             <actions>
2981                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2982                 <retrieve/>
2983                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2984                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2985             </actions>
2986         </permacrud>
2987         </class>
2988         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2989                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2990                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2991                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2992                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2993                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2994                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2995                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2996                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2997                 </fields>
2998                 <links>
2999                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3000                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3001         </links>
3002         </class>
3003         <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">
3004                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3005                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3006                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3007                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3008                 </fields>
3009                 <links>
3010                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3011                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3012                 </links>
3013         </class>
3014         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3015                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3016                         <field name="id" reporter:datatype="id" />
3017                         <field name="value" oils_persist:i18n="true" />
3018                 </fields>
3019                 <links/>
3020         </class>
3021         <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
3022                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3023                         <field name="balance_owed" reporter:datatype="money" />
3024                         <field name="total_owed" reporter:datatype="money" />
3025                         <field name="total_paid" reporter:datatype="money" />
3026                         <field name="usr" reporter:datatype="link"/>
3027                 </fields>
3028                 <links>
3029                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3030         </links>
3031         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3032             <actions>
3033                 <retrieve permission="VIEW_USER">
3034                     <context link="usr" field="home_ou"/>
3035                 </retrieve>
3036             </actions>
3037         </permacrud>
3038         </class>
3039         <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">
3040                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3041                         <field name="collector" />
3042                         <field name="enter_time" reporter:datatype="timestamp"/>
3043                         <field name="id" reporter:datatype="id" />
3044                         <field name="location" reporter:datatype="link"/>
3045                         <field name="usr" reporter:datatype="link"/>
3046                 </fields>
3047                 <links>
3048                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3049                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3050                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3051                 </links>
3052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3053             <actions>
3054                 <create permission="money.collections_tracker.create" context_field="location"/>
3055                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3056                 <delete permission="money.collections_tracker.create" context_field="location"/>
3057             </actions>
3058         </permacrud>
3059         </class>
3060         <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">
3061                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3062                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3063                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3064                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3065                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3066                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3067                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3068                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3069                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3070                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3071                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3072                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3073                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3074                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3075                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3076                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3077                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3078                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3079                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3080                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3081                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3082                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3083                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3084                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3085                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3086                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3087                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3088                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3089                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3090                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3091                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3092                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3093                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3094                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3095                 </fields>
3096                 <links>
3097                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3098                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3099                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3100                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3101                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3102                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3103                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3104                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3105                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3106                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3107                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3108                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3109                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3110                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3111                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3112                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3113                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3114                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3115                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3116                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3117                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3118                 </links>
3119         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3120             <actions>
3121                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3122                 <retrieve/>
3123                 <update permission="UPDATE_MARC" global_required="true"/>
3124                 <!-- WARNING: Deleting records via PCRUD does NOT check that any prerequisite conditions have been handled first. It is your responsibility to check for those conditions before deleting bib records. -->
3125                 <delete permission="DELETE_RECORD" global_required="true"/>
3126             </actions>
3127         </permacrud>
3128         </class>
3129         <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">
3130                 <fields oils_persist:primary="id">
3131                         <field name="dow_0_close" />
3132                         <field name="dow_0_open" />
3133                         <field name="dow_1_close" />
3134                         <field name="dow_1_open" />
3135                         <field name="dow_2_close" />
3136                         <field name="dow_2_open" />
3137                         <field name="dow_3_close" />
3138                         <field name="dow_3_open" />
3139                         <field name="dow_4_close" />
3140                         <field name="dow_4_open" />
3141                         <field name="dow_5_close" />
3142                         <field name="dow_5_open" />
3143                         <field name="dow_6_close" />
3144                         <field name="dow_6_open" />
3145                         <field name="id" reporter:datatype="id" />
3146                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3147                 </fields>
3148                 <links>
3149                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3150                 </links>
3151         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3152             <actions>
3153                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3154                 <retrieve/>
3155                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3156                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3157             </actions>
3158         </permacrud>
3159         </class>
3160         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
3161                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3162                         <field name="id" reporter:datatype="id" />
3163                         <field name="record" reporter:datatype="link"/>
3164                         <field name="label" reporter:datatype="text"/>
3165                         <field name="label_sortkey" reporter:datatype="text"/>
3166                         <field name="deleted" reporter:datatype="bool"/>
3167                 </fields>
3168                 <links>
3169                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3170                 </links>
3171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3172             <actions>
3173                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3174                 <retrieve/>
3175                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3176                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3177             </actions>
3178         </permacrud>
3179         </class>
3180         <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
3181                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3182                         <field name="id" reporter:datatype="id" />
3183                         <field name="target_copy" reporter:datatype="link" />
3184                         <field name="part" reporter:datatype="link"/>
3185                 </fields>
3186                 <links>
3187                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3188                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3189                 </links>
3190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3191             <actions>
3192                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3193                 <retrieve/>
3194                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3195                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3196             </actions>
3197         </permacrud>
3198         </class>
3199         <class id="aoucd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::closed_date" oils_persist:tablename="actor.org_unit_closed" reporter:label="Closed Dates">
3200                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3201                         <field name="close_end" reporter:datatype="timestamp" />
3202                         <field name="close_start" reporter:datatype="timestamp" />
3203                         <field name="id" reporter:datatype="id" />
3204                         <field name="org_unit" reporter:datatype="org_unit"/>
3205                         <field name="reason" reporter:datatype="text"/>
3206                 </fields>
3207                 <links>
3208                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3209                 </links>
3210         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3211             <actions>
3212                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3213                 <retrieve/>
3214                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3215                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3216             </actions>
3217         </permacrud>
3218         </class>
3219         <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">
3220                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3221                         <field name="extended" reporter:datatype="interval"/>
3222                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3223                         <field name="max_renewals" reporter:datatype="int" />
3224                         <field name="name" reporter:datatype="text"/>
3225                         <field name="normal" reporter:datatype="interval"/>
3226                         <field name="shrt" reporter:datatype="interval"/>
3227                 </fields>
3228                 <links>
3229                 </links>
3230         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3231             <actions>
3232                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3233                 <retrieve/>
3234                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3235                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3236             </actions>
3237         </permacrud>
3238         </class>
3239
3240         <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">
3241                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3242                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3243                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3244             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3245                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3246             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3247                 </fields>
3248                 <links>
3249             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3250                 </links>
3251                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3252             <actions>
3253                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3254                 <retrieve/>
3255                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3256                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3257             </actions>
3258                 </permacrud>
3259         </class>
3260
3261         <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">
3262                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3263                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3264                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3265                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3266             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3267                 </fields>
3268                 <links>
3269                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3270                 </links>
3271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3272             <actions>
3273                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3274                 <retrieve/>
3275                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3276                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3277             </actions>
3278                 </permacrud>
3279         </class>
3280
3281         <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">
3282                 <fields oils_persist:primary="id" oils_persist:sequence="">
3283                         <field name="balance_owed" reporter:datatype="money"/>
3284                         <field name="id" reporter:datatype="id" />
3285                         <field name="last_billing_note" reporter:datatype="text"/>
3286                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3287                         <field name="last_billing_type" reporter:datatype="text"/>
3288                         <field name="last_payment_note" reporter:datatype="text"/>
3289                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3290                         <field name="last_payment_type" reporter:datatype="text"/>
3291                         <field name="total_owed" reporter:datatype="money"/>
3292                         <field name="total_paid" reporter:datatype="money"/>
3293                         <field name="usr" reporter:datatype="link"/>
3294                         <field name="xact_finish" reporter:datatype="timestamp" />
3295                         <field name="xact_start" reporter:datatype="timestamp" />
3296                         <field name="xact_type" reporter:datatype="text"/>
3297                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3298                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3299                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3300                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3301                         <field name="billing_location" reporter:datatype="link"/>
3302                 </fields>
3303                 <links>
3304                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3305                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3306                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3307                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3308                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3309                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3310                 </links>
3311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3312                         <actions>
3313                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3314                                         <context link="usr" field="home_ou" />
3315                                 </retrieve>
3316                         </actions>
3317                 </permacrud>
3318         </class>
3319         <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">
3320                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3321                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3322                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3323                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3324                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3325                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3326                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3327                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3328                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3329                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3330                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3331                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3332                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3333                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3334                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3335                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3336                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3337                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3338                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3339                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3340                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3341                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3342                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3343                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3344                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3345                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3346                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3347                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3348                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3349                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3350                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3351                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3352                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3353                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3354                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3355                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3356                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3357                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3358                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3359                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3360                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3361                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3362                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3363                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3364                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3365                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3366                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3367                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3368                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3369                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3370                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3371                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3372                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3373                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3374                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3375                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3376                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3377                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3378                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3379                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3380                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3381                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3382                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3383                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3384                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3385                 </fields>
3386                 <links>
3387                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3388                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3389                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3390                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3391                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3392                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3393                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3394                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3395                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3396                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3397                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3398                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3399                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3400                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3401                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3402                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3403                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3404                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3405                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3406                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3407                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3408                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3409                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3410                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3411                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3412                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3413                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3414                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3415                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3416                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3417                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3418                 </links>
3419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3420                         <actions>
3421                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3422                         </actions>
3423                 </permacrud>
3424         </class>
3425         <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">
3426                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3427                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3428                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3429                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3430                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3431                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3432                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3433                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3434                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3435         </fields>
3436                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3437                         <actions>
3438                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3439                                 <retrieve/>
3440                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3441                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3442                         </actions>
3443                 </permacrud>
3444         </class>
3445         <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">
3446                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3447                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3448                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3449                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3450                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3451         </fields>
3452         <links>
3453                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3454                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3455                 </links>
3456                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3457                         <actions>
3458                                 <retrieve permission="RUN_REPORTS">
3459                                         <context link="usr" field="home_ou" />
3460                                 </retrieve>
3461                         </actions>
3462                 </permacrud>
3463         </class>
3464         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3465                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3466                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3467                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3468                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3469                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3470                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3471                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3472         </fields>
3473         <links>
3474                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3475                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3476                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3477                 </links>
3478                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3479                         <actions>
3480                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3481                                         <context link="usr" field="home_ou" />
3482                                         <context link="ws" field="owning_lib" />
3483                                 </retrieve>
3484                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3485                                         <context link="usr" field="home_ou" />
3486                                         <context link="ws" field="owning_lib" />
3487                                 </create>
3488                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3489                                         <context link="usr" field="home_ou" />
3490                                         <context link="ws" field="owning_lib" />
3491                                 </update>
3492                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3493                                         <context link="usr" field="home_ou" />
3494                                         <context link="ws" field="owning_lib" />
3495                                 </delete>
3496                         </actions>
3497                 </permacrud>
3498         </class>
3499         <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">
3500                 <fields oils_persist:primary="name">
3501                         <field name="name" reporter:datatype="text"/>
3502                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3503                 </fields>
3504                 <links/>
3505                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3506                         <actions>
3507                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3508                                 <retrieve/>
3509                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3510                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3511                         </actions>
3512                 </permacrud>
3513         </class>
3514         <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">
3515                 <fields oils_persist:primary="name">
3516                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3517                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3518                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3519                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3520                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3521                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3522                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3523                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3524                 </fields>
3525                 <links>
3526                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3527                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3528                 </links>
3529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3530                         <actions>
3531                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3532                                 <retrieve/>
3533                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3534                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3535                         </actions>
3536                 </permacrud>
3537         </class>
3538         <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">
3539                 <fields oils_persist:primary="name">
3540                         <field name="name" reporter:datatype="text"/>
3541                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3542                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3543                         <field name="datatype" reporter:datatype="text"/>
3544                         <field name="view_perm" reporter:datatype="link"/>
3545                         <field name="update_perm" reporter:datatype="link"/>
3546                         <field name="fm_class" reporter:datatype="text"/>
3547                         <field name="grp" reporter:datatype="link"/>
3548                 </fields>
3549                 <links>
3550                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3551                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3552                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3553                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3554                 </links>
3555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3556                         <actions>
3557                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3558                                 <retrieve/>
3559                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3560                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3561                         </actions>
3562                 </permacrud>
3563         </class>
3564         <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">
3565                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3566                         <field name="id" />
3567                         <field name="name"  reporter:datatype="text"/>
3568                         <field name="org_unit" reporter:datatype="org_unit"/>
3569                         <field name="value"  reporter:datatype="text"/>
3570                 </fields>
3571                 <links>
3572                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3573                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3574                 </links>
3575         </class>
3576         <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">
3577                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3578                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3579                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3580                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3581                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3582                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3583                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3584                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3585                 </fields>
3586                 <links>
3587                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3588                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3589                 </links>
3590         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3591             <actions>
3592                 <create permission="CREATE_COPY_NOTE">
3593                     <context link="owning_copy" field="circ_lib"/>
3594                 </create>
3595                 <retrieve permission="VIEW_COPY_NOTES">
3596                     <context link="owning_copy" field="circ_lib"/>
3597                 </retrieve>
3598                 <update permission="UPDATE_COPY_NOTE">
3599                     <context link="owning_copy" field="circ_lib"/>
3600                 </update>
3601                 <delete permission="DELETE_COPY_NOTE">
3602                     <context link="owning_copy" field="circ_lib"/>
3603                 </delete>
3604             </actions>
3605         </permacrud>
3606         </class>
3607         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3608                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3609                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3610                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3611                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3612                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3613                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3614                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3615                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3616                 </fields>
3617                 <links>
3618                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3619                 </links>
3620         </class>
3621         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3622                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3623                         <field name="fingerprint"  reporter:datatype="text"/>
3624                         <field name="id" reporter:datatype="id" />
3625                         <field name="master_record" reporter:datatype="link"/>
3626                         <field name="mods"  reporter:datatype="text"/>
3627                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3628                 </fields>
3629                 <links>
3630                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3631                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3632                 </links>
3633         </class>
3634         <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">
3635                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3636                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3637                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3638                 </fields>
3639                 <links/>
3640         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3641             <actions>
3642                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3643                 <retrieve/>
3644                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3645                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3646             </actions>
3647         </permacrud>
3648         </class>
3649         <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">
3650                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3651                         <field name="code"  reporter:datatype="text"/>
3652                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3653                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3654                 </fields>
3655                 <links/>
3656         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3657             <actions>
3658                 <create permission="CREATE_PERM" global_required="true"/>
3659                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3660                 <update permission="UPDATE_PERM" global_required="true"/>
3661                 <delete permission="DELETE_PERM" global_required="true"/>
3662             </actions>
3663         </permacrud>
3664         </class>
3665         <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
3666                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3667                         <field name="id" reporter:datatype="id" />
3668                         <field name="metarecord" reporter:datatype="link"/>
3669                         <field name="source" reporter:datatype="link"/>
3670                 </fields>
3671                 <links>
3672                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3673                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3674                 </links>
3675         </class>
3676         <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">
3677                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3678                         <field name="id" reporter:datatype="id" />
3679                         <field name="field" reporter:datatype="link"/>
3680                         <field name="source" reporter:datatype="link"/>
3681                         <field name="value"  reporter:datatype="text"/>
3682                 </fields>
3683                 <links>
3684                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3685                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3686                 </links>
3687         </class>
3688         <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">
3689                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3690                         <field name="id" reporter:datatype="id" />
3691                         <field name="value" reporter:datatype="text"/>
3692                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3693                 </fields>
3694                 <links>
3695                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3696                 </links>
3697         </class>
3698         <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">
3699                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3700                         <field name="id" reporter:datatype="id" />
3701                         <field name="entry" reporter:datatype="link"/>
3702                         <field name="def" reporter:datatype="link"/>
3703                         <field name="source" reporter:datatype="link"/>
3704                 </fields>
3705                 <links>
3706                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3707                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3708                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3709                 </links>
3710         </class>
3711         <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">
3712                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3713                         <field name="id" reporter:datatype="id" />
3714                         <field name="entry" reporter:datatype="link"/>
3715                         <field name="simple_heading" reporter:datatype="link"/>
3716                 </fields>
3717                 <links>
3718                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3719                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3720                 </links>
3721         </class>
3722         <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">
3723                 <oils_persist:source_definition>
3724                         SELECT * FROM metabib.author_field_entry
3725                                                 UNION ALL
3726                         SELECT * FROM metabib.keyword_field_entry
3727                                                 UNION ALL
3728                         SELECT * FROM metabib.identifier_field_entry
3729                                                 UNION ALL
3730                         SELECT * FROM metabib.title_field_entry
3731                                                 UNION ALL
3732                         SELECT * FROM metabib.subject_field_entry
3733                                                 UNION ALL
3734                         SELECT * FROM metabib.series_field_entry
3735                 </oils_persist:source_definition>
3736                 <fields>
3737                         <field name="field" reporter:datatype="link"/>
3738                         <field name="id" reporter:datatype="id" />
3739                         <field name="source" reporter:datatype="link"/>
3740                         <field name="value"  reporter:datatype="text"/>
3741                 </fields>
3742                 <links>
3743                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3744                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3745                 </links>
3746         </class>
3747         <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">
3748                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3749                         <field name="field" reporter:datatype="link"/>
3750                         <field name="id" reporter:datatype="id" />
3751                         <field name="source" reporter:datatype="link"/>
3752                         <field name="value"  reporter:datatype="text"/>
3753                 </fields>
3754                 <links>
3755                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3756                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3757                 </links>
3758         </class>
3759         <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">
3760                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3761                         <field name="accepting_usr" reporter:datatype="link"/>
3762                         <field name="amount" reporter:datatype="money" />
3763                         <field name="amount_collected" reporter:datatype="money" />
3764                         <field name="cash_drawer" reporter:datatype="link"/>
3765                         <field name="id" reporter:datatype="id" />
3766                         <field name="note"  reporter:datatype="text"/>
3767                         <field name="payment_ts" reporter:datatype="timestamp"/>
3768                         <field name="xact" reporter:datatype="link"/>
3769                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3770                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3771                 </fields>
3772                 <links>
3773                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3774                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3775                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3776                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3777                 </links>
3778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3779             <actions>
3780                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3781                     <context link="xact" jump="usr" field="home_ou"/>
3782                 </retrieve>
3783                         </actions>
3784                 </permacrud>
3785         </class>
3786         <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">
3787                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3788                         <field name="accepting_usr" reporter:datatype="link"/>
3789                         <field name="amount" reporter:datatype="money" />
3790                         <field name="amount_collected" reporter:datatype="money" />
3791                         <field name="id" reporter:datatype="id" />
3792                         <field name="note"  reporter:datatype="text"/>
3793                         <field name="payment_ts" reporter:datatype="timestamp"/>
3794                         <field name="xact" reporter:datatype="link"/>
3795                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3796                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3797                 </fields>
3798                 <links>
3799                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3800                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3801                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3802                 </links>
3803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3804             <actions>
3805                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3806                     <context link="xact" jump="usr" field="home_ou"/>
3807                 </retrieve>
3808                         </actions>
3809                 </permacrud>
3810         </class>
3811         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3812                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3813                         <field name="accepting_usr" reporter:datatype="link"/>
3814                         <field name="amount" reporter:datatype="money" />
3815                         <field name="amount_collected" reporter:datatype="money" />
3816                         <field name="id" reporter:datatype="id" />
3817                         <field name="note"  reporter:datatype="text"/>
3818                         <field name="payment_ts" reporter:datatype="timestamp"/>
3819                         <field name="xact" reporter:datatype="link"/>
3820                         <field name="billing" reporter:datatype="link"/>
3821                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3822                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3823                 </fields>
3824                 <links>
3825                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3826                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3827                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3828                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3829                 </links>
3830         </class>
3831         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3832                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3833                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3834                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3835                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3836                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3837                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3838                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3839                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3840                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3841                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3842                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3843                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3844                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3845                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3846                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3847                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3848                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3849                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3850                 </fields>
3851                 <links>
3852                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3853                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3854                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3855                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3856                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3857                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3858                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3859                 </links>
3860         </class>
3861
3862         <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">
3863                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3864                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3865                         <field name="name"  reporter:datatype="text"/>
3866                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3867                         <field name="block_list" reporter:datatype="text"/>
3868                         <field name="staff_alert" reporter:datatype="bool"/>
3869                         <field name="org_depth" reporter:datatype="int"/>
3870                         <field name="ignore_proximity" reporter:datatype="int"/>
3871                 </fields>
3872                 <links/>
3873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3874             <actions>
3875                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3876                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3877                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3878                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3879             </actions>
3880         </permacrud>
3881         </class>
3882         <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">
3883                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3884                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3885                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3886                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3887                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3888                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3889                 </fields>
3890                 <links>
3891                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3892                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3893                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3894         </links>
3895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3896             <actions>
3897                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3898                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3899                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3900                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3901             </actions>
3902         </permacrud>
3903         </class>
3904         <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">
3905                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3906                         <field name="holdable" reporter:datatype="bool"/>
3907                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3908                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3909                         <field name="opac_visible" reporter:datatype="bool"/>
3910             <field name="copy_active" reporter:datatype="bool"/>
3911             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3912             <field name="is_available" reporter:datatype="bool"/>
3913                 </fields>
3914                 <links/>
3915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3916             <actions>
3917                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3918                 <retrieve/>
3919                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3920                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3921             </actions>
3922         </permacrud>
3923         </class>
3924         <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">
3925                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3926                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3927                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3928                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3929                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3930                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3931                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3932                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3933                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3934                 </fields>
3935                 <links>
3936                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3937                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3938                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3939                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3940                 </links>
3941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3942                         <actions>
3943                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3944                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3945                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3946                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3947                         </actions>
3948                 </permacrud>
3949         </class>
3950         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3951                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3952                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3953                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3954                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3955                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3956                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3957                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3958                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3959                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3960                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3961                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3962                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3963                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3964                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3965                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3966                 </fields>
3967                 <links>
3968                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3969                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3970                 </links>
3971         </class>
3972         <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">
3973                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3974                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3975                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3976                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3977                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3978                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3979                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3980                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3981                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3982                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3983                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3984                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3985                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3986                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3987                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3988                 </fields>
3989                 <links>
3990                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3991                 </links>
3992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3993                         <actions>
3994                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3995                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3996                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3997                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3998                         </actions>
3999                 </permacrud>
4000         </class>
4001
4002
4003         <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">
4004                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4005                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4006                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4007                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4008                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4009                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4010                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4011                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4012                 </fields>
4013                 <links>
4014                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4015                 </links>
4016         </class>
4017
4018         <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">
4019                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4020                         <field name="call_number" />
4021                         <field name="create_date" reporter:datatype="timestamp"/>
4022                         <field name="creator" reporter:datatype="link"/>
4023                         <field name="id" reporter:datatype="id" />
4024                         <field name="pub" reporter:datatype="bool"/>
4025                         <field name="title"  reporter:datatype="text"/>
4026                         <field name="value"  reporter:datatype="text"/>
4027                 </fields>
4028                 <links>
4029                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4030                 </links>
4031         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4032             <actions>
4033                 <create permission="CREATE_VOLUME_NOTE">
4034                     <context link="call_number" field="owning_lib"/>
4035                 </create>
4036                 <retrieve permission="VIEW_VOLUME_NOTES">
4037                     <context link="call_number" field="owning_lib"/>
4038                 </retrieve>
4039                 <update permission="UPDATE_VOLUME_NOTE">
4040                     <context link="call_number" field="owning_lib"/>
4041                 </update>
4042                 <delete permission="DELETE_VOLUME_NOTE">
4043                     <context link="call_number" field="owning_lib"/>
4044                 </delete>
4045             </actions>
4046         </permacrud>
4047         </class>
4048         <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">
4049                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4050                         <field name="create_date" reporter:datatype="timestamp"/>
4051                         <field name="creator" reporter:datatype="link"/>
4052                         <field name="edit_date" reporter:datatype="timestamp"/>
4053                         <field name="editor" reporter:datatype="link"/>
4054                         <field name="id" reporter:datatype="id" />
4055                         <field name="record" reporter:datatype="link"/>
4056                         <field name="value" reporter:datatype="text"/>
4057                 </fields>
4058                 <links>
4059                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4060                 </links>
4061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4062             <actions>
4063                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4064                 <retrieve/>
4065                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4066                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4067             </actions>
4068         </permacrud>
4069         </class>
4070         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4071         <oils_persist:source_definition>
4072 SELECT  usr,
4073         SUM(
4074             CASE
4075                 WHEN (
4076                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4077                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4078                 ) THEN 1
4079                 ELSE 0
4080             END
4081         ) AS out,
4082
4083         SUM(
4084             CASE
4085                 WHEN (
4086                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4087                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4088                 ) THEN 1
4089                 ELSE 0
4090             END
4091         ) AS overdue,
4092
4093         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4094         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4095         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4096   FROM  action.circulation
4097   WHERE checkin_time IS NULL
4098   GROUP BY 1
4099         </oils_persist:source_definition>
4100         <fields oils_persist:primary="usr">
4101             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4102             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4103             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4104             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4105             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4106             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4107         </fields>
4108         <links>
4109             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4110         </links>
4111         </class>
4112         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4113         <oils_persist:source_definition>
4114 SELECT  usr,
4115         STRING_AGG(
4116             CASE
4117                 WHEN (
4118                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4119                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4120                 ) THEN id::TEXT
4121                 ELSE '0'
4122             END
4123         ,',') AS out,
4124
4125         STRING_AGG(
4126             CASE
4127                 WHEN (
4128                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4129                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4130                 ) THEN id::TEXT
4131                 ELSE '0'
4132             END
4133         ,',') AS overdue,
4134
4135         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4136         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4137         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4138   FROM  action.circulation
4139   WHERE checkin_time IS NULL
4140   GROUP BY 1
4141         </oils_persist:source_definition>
4142         <fields oils_persist:primary="usr">
4143             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4144             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4145             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4146             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4147             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4148             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4149         </fields>
4150         <links>
4151             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4152         </links>
4153         </class>
4154         <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">
4155                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4156                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4157                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4158                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4159                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4160                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4161                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4162                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4163                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4164                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4165                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4166                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4167                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4168                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4169                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4170                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4171                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4172                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4173                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4174                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4175                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4176                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4177                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4178                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4179                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4180                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4181                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4182                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4183                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4184                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4185                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4186                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4187                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4188                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4189                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4190                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4191                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4192                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4193                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4194                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4195                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4196                 </fields>
4197                 <links>
4198                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4199                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4200                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4201                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4202                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4203                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4204                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4205                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4206                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4207                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4208                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4209                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4210                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4211                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4212                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4213                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4214                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4215                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4216                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4217                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4218                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4219                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4220                 </links>
4221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4222                         <actions>
4223                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4224                         </actions>
4225                 </permacrud>
4226         </class>
4227         <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">
4228                 <fields>
4229                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4230                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4231                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4232                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4233                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4234                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4235                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4236                 </fields>
4237                 <links>
4238                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4239                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4240                 </links>
4241                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4242                         <actions>
4243                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4244                         </actions>
4245                 </permacrud>
4246         </class>
4247         <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">
4248                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4249                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4250                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4251                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4252                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4253                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4254                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4255                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4256                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4257                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4258                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4259                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4260                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4261                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4262                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4263                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4264                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4265                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4266                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4267                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4268                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4269                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4270                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4271                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4272                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4273                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4274                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4275                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4276                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4277                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4278                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4279                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4280                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4281                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4282                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4283                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4284                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4285                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4286                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4287                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4288                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4289                 </fields>
4290                 <links>
4291                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4292                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4293                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4294                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4295                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4296                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4297                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4298                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4299                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4300                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4301                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4302                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4303                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4304                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4305                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4306                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4307                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4308                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4309                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4310                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4311                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4312                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4313                 </links>
4314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4315                         <actions>
4316                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4317                         </actions>
4318                 </permacrud>
4319         </class>
4320
4321         <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">
4322                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4323                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4324                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4325                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4326                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4327                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4328                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4329                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4330                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4331                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4332                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4333                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4334                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4335                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4336                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4337                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4338                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4339                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4340                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4341                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4342                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4343                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4344                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4345                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4346                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4347                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4348                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4349                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4350                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4351                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4352                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4353                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4354                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4355                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4356                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4357                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4358                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4359                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4360                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4361                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4362                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4363                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4364                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4365                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4366                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4367                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4368                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4369                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4370                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4371                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4372                 </fields>
4373                 <links>
4374                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4375                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4376                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4377                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4378                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4379                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4380                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4381                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4382                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4383                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4384                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4385                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4386                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4387                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4388                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4389                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4390                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4391                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4392                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4393                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4394                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4395                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4396                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4397                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4398                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4399                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4400                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4401                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4402                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4403                 </links>
4404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4405                         <actions>
4406                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4407                         </actions>
4408                 </permacrud>
4409         </class>
4410         <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">
4411                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4412                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4413                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4414                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4415                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4416                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4417                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4418                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4419                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4420                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4421                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4422                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4423                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4424                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4425                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4426                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4427                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4428                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4429                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4430                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4431                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4432                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4433                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4434                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4435                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4436                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4437                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4438                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4439                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4440                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4441                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4442                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4443                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4444                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4445                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4446                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4447                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4448                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4449                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4450                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4451                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4452                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4453                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4454                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4455                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4456                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4457                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4458                 </fields>
4459                 <links>
4460                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4461                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4462                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4463                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4464                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4465                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4466                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4467                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4468                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4469                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4470                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4471                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4472                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4473                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4474                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4475                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4476                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4477                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4478                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4479                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4480                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4481                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4482                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4483                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4484                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4485                 </links>
4486         </class>
4487         <class id="auch" 
4488                 controller="open-ils.cstore" 
4489                 oils_obj:fieldmapper="action::user_circ_history" 
4490                 oils_persist:tablename="action.usr_circ_history" 
4491                 reporter:label="User Checkout History">
4492                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4493                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4494                         <!-- prevent reporting on the user that owns the checkout history -->
4495                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4496                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4497                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4498                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4499                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4500                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4501                 </fields>
4502                 <links>
4503                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4504                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4505                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4506                 </links>
4507         </class>
4508         <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">
4509                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4510                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4511                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4512                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4513                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4514                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4515                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4516                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4517                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4518                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4519                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4520                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4521                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4522                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4523                 </fields>
4524                 <links>
4525                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4526                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4527                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4528                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4529                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4530                 </links>
4531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4532                         <actions>
4533                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4534                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4535                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4536                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4537                         </actions>
4538                 </permacrud>
4539         </class>
4540
4541         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4542                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4543                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4544                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4545                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4546                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4547                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4548                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4549                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4550                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4551                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4552                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4553                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4554                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4555                 </fields>
4556                 <links>
4557                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4558                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4559                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4560                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4561                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4562                 </links>
4563                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4564                         <actions>
4565                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4566                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4567                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4568                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4569                         </actions>
4570                 </permacrud>
4571         </class>
4572         
4573         <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">
4574                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4575                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4576                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4577                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4578                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4579                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4580                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4581                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4582                 </fields>
4583                 <links>
4584                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4585                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4586                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4587                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4588                 </links>
4589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4590                         <actions>
4591                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4592                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4593                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4594                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4595                         </actions>
4596                 </permacrud>
4597         </class>
4598         
4599         <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">
4600                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4601                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4602                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4603                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4604                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4605                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4606                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4607                 </fields>
4608                 <links>
4609                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4610                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4611                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4612                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4613                 </links>
4614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4615                         <actions>
4616                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4617                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4618                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4619                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4620                         </actions>
4621                 </permacrud>
4622         </class>
4623         
4624         <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">
4625                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4626                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4627                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4628                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4629                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4630                 </fields>
4631                 <links>
4632                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4633                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4634                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4635                 </links>
4636                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4637                         <actions>
4638                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4639                     <context link="resource" field="owner" />
4640                 </create>
4641                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4642                     <context link="resource" field="owner" />
4643                 </retrieve>
4644                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4645                     <context link="resource" field="owner" />
4646                 </update>
4647                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4648                     <context link="resource" field="owner" />
4649                 </delete>
4650                         </actions>
4651                 </permacrud>
4652         </class>
4653         
4654         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4655                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4656                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4657                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4658                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4659                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4660                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4661                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4662                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4663                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4664                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4665                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4666                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4667                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4668                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4669                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4670                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4671                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4672                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4673                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4674                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4675                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4676                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4677                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4678                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4679                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4680                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4681                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4682                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4683                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4684                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4685                 </fields>
4686                 <links>
4687                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4688                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4689                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4690                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4691                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4692                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4693                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4694                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4695                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4696                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4697                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4698                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4699                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4700                 </links>
4701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4702                         <actions>
4703                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4704                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4705                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4706                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4707                         </actions>
4708                 </permacrud>
4709         </class>
4710         
4711         <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">
4712                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4713                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4714                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4715                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4716                 </fields>
4717                 <links>
4718                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4719                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4720                 </links>
4721                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4722                         <actions>
4723                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4724                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4725                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4726                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4727                         </actions>
4728                 </permacrud>
4729         </class>
4730
4731         <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
4732                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4733                         <field name="bucket" reporter:datatype="link"/>
4734                         <field name="id" reporter:datatype="id" />
4735                         <field name="target_call_number" reporter:datatype="link" />
4736                         <field name="create_time" reporter:datatype="timestamp" />
4737                         <field name="pos" reporter:datatype="int" />
4738                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4739                 </fields>
4740                 <links>
4741                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4742                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4743             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4744                 </links>
4745         </class>
4746         <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">
4747                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4748                         <field name="id" reporter:datatype="id" />
4749                         <field name="item" reporter:datatype="link"/>
4750                         <field name="note" reporter:datatype="text" />
4751                 </fields>
4752                 <links>
4753                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4754                 </links>
4755         </class>
4756         <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
4757                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4758                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4759                         <field name="btype" reporter:datatype="text"/>
4760                         <field name="id" reporter:datatype="id" />
4761                         <field name="name" reporter:datatype="text"/>
4762                         <field name="description" reporter:datatype="text"/>
4763                         <field name="owner" reporter:datatype="link"/>
4764                         <field name="pub" reporter:datatype="bool"/>
4765                         <field name="create_time" reporter:datatype="timestamp" />
4766                 </fields>
4767                 <links>
4768                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4769                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4770                 </links>
4771         </class>
4772         <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">
4773                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4774                         <field name="id" reporter:datatype="id" />
4775                         <field name="bucket" reporter:datatype="link"/>
4776                         <field name="note" reporter:datatype="text" />
4777                 </fields>
4778                 <links>
4779                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4780                 </links>
4781         </class>
4782         <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">
4783                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4784                         <field name="hold" reporter:datatype="link"/>
4785                         <field name="id" reporter:datatype="id" />
4786                         <field name="target_copy" reporter:datatype="link"/>
4787                         <field name="proximity" reporter:datatype="number"/>
4788                 </fields>
4789                 <links>
4790                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4791                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4792                 </links>
4793         </class>
4794         <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">
4795                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4796                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4797                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4798                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4799                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4800                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4801                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4802                 </fields>
4803                 <links>
4804                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4805                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4806                 </links>
4807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4808             <actions>
4809                 <create permission="CREATE_HOLD_NOTIFICATION">
4810                                         <context link="hold" jump="usr" field="home_ou" />
4811                                 </create>
4812                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4813                                         <context link="hold" jump="usr" field="home_ou" />
4814                                 </retrieve>
4815                 <update permission="CREATE_HOLD_NOTIFICATION">
4816                                         <context link="hold" jump="usr" field="home_ou" />
4817                                 </update>
4818                 <delete permission="CREATE_HOLD_NOTIFICATION">
4819                                         <context link="hold" jump="usr" field="home_ou" />
4820                                 </delete>
4821             </actions>
4822         </permacrud>
4823         </class>
4824         <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">
4825                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4826                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4827                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4828                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4829                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4830                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4831                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4832                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4833                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4834                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4835                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4836                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4837                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4838                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4839                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4840                 </fields>
4841                 <links>
4842                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4843                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4844                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4845                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4846                 </links>
4847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4848             <actions>
4849                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4850                 <retrieve/>
4851                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4852                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4853             </actions>
4854         </permacrud>
4855         </class>
4856         <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">
4857                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4858                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4859                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4860                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4861                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4862             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4863             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4864             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4865                 </fields>
4866                 <links>
4867                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4868                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4869                 </links>
4870         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4871             <actions>
4872                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4873                 <retrieve/>
4874                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4875                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4876             </actions>
4877         </permacrud>
4878         </class>
4879         <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">
4880                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4881                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4882             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4883             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4884                 </fields>
4885                 <links>
4886                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4887                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4888                 </links>
4889         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4890             <actions>
4891                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4892                                         <context link="lgroup" field="owner" />
4893                 </create>
4894                 <retrieve/>
4895                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4896                                         <context link="lgroup" field="owner" />
4897                 </update>
4898                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4899                                         <context link="lgroup" field="owner" />
4900                 </delete>
4901             </actions>
4902         </permacrud>
4903         </class>
4904
4905     <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">
4906         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4907             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4908             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4909             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4910             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4911         </fields>
4912         <links>
4913             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4914             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4915         </links>
4916         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4917             <actions>
4918                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4919                 <retrieve/>
4920                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4921                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4922             </actions>
4923         </permacrud>
4924     </class>
4925
4926         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4927                 <fields>
4928                         <field name="sre_id" oils_persist:virtual="true" />
4929                         <field name="location" oils_persist:virtual="true" />
4930                         <field name="owning_lib" oils_persist:virtual="true" />
4931                         <field name="basic_holdings" oils_persist:virtual="true" />
4932                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4933                         <field name="supplement_holdings" oils_persist:virtual="true" />
4934                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4935                         <field name="index_holdings" oils_persist:virtual="true" />
4936                         <field name="index_holdings_add" oils_persist:virtual="true" />
4937                         <field name="online" oils_persist:virtual="true" />
4938                         <field name="missing" oils_persist:virtual="true" />
4939                         <field name="incomplete" oils_persist:virtual="true" />
4940                 </fields>
4941         </class>
4942
4943         <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">
4944                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4945                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4946                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4947                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4948                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4949                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4950                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4951                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4952                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4953                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4954                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4955                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4956                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4957                 </fields>
4958                 <links>
4959                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4960                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4961                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4962                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4963                 </links>
4964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4965                         <actions>
4966                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4967                                 <retrieve/>
4968                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4969                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4970                         </actions>
4971                 </permacrud>
4972         </class>
4973
4974         <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">
4975                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4976                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4977                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4978                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4979                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4980                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4981                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4982                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4983                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4984                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4985                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4986                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4987                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4988                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4989                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4990                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4991                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4992                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4993                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4994                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4995                 </fields>
4996                 <links>
4997                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4998                 </links>
4999                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5000                         <actions>
5001                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5002                                         <context link="subscription" field="owning_lib" />
5003                                 </create>
5004                                 <retrieve />
5005                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5006                                         <context link="subscription" field="owning_lib" />
5007                                 </update>
5008                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5009                                         <context link="subscription" field="owning_lib" />
5010                                 </delete>
5011                         </actions>
5012                 </permacrud>
5013         </class>
5014
5015         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5016                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5017                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5018                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5019                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5020                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5021                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5022                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5023                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5024                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5025                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5026                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5027                 </fields>
5028                 <links>
5029                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5030                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5031                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5032                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5033                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5034                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5035                 </links>
5036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5037                         <actions>
5038                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5039                                 <retrieve />
5040                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5041                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5042                         </actions>
5043                 </permacrud>
5044         </class>
5045
5046         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
5047                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5048                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5049                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5050                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5051                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5052                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5053                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5054                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5055                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5056                 </fields>
5057                 <links>
5058                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5059                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5060                 </links>
5061         </class>
5062
5063         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5064                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5065                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5066                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5067                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5068                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5069                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5070                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5071                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5072                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5073                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5074                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5075                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5076                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5077                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5078                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5079                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5080                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5081                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5082                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5083                 </fields>
5084                 <links>
5085                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5086                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5087                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5088                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5089                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5090                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5091                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5092                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5093                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5094                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5095                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5096                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5097                 </links>
5098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5099                         <actions>
5100                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5101                                 <retrieve />
5102                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5103                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5104                         </actions>
5105                 </permacrud>
5106         </class>
5107
5108         <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">
5109                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5110                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5111                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5112                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5113                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5114                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5115                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5116                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5117                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5118                 </fields>
5119                 <links>
5120                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5121                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5122                 </links>
5123                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5124                         <actions>
5125                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5126                                         <context link="distribution" field="holding_lib" />
5127                                 </create>
5128                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5129                                         <context link="distribution" field="holding_lib" />
5130                                 </retrieve>
5131                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5132                                         <context link="distribution" field="holding_lib" />
5133                                 </update>
5134                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5135                                         <context link="distribution" field="holding_lib" />
5136                                 </delete>
5137                         </actions>
5138                 </permacrud>
5139         </class>
5140
5141         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5142                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5143                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5144                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5145                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5146                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5147                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5148                 </fields>
5149                 <links>
5150                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5151                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
5152                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5153                 </links>
5154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5155                         <actions>
5156                                 <create permission="ADMIN_SERIAL_STREAM">
5157                                         <context link="distribution" field="holding_lib" />
5158                                 </create>
5159                                 <retrieve />
5160                                 <update permission="ADMIN_SERIAL_STREAM">
5161                                         <context link="distribution" field="holding_lib" />
5162                                 </update>
5163                                 <delete permission="ADMIN_SERIAL_STREAM">
5164                                         <context link="distribution" field="holding_lib" />
5165                                 </delete>
5166                         </actions>
5167                 </permacrud>
5168         </class>
5169
5170         <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">
5171                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5172                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5173                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5174                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5175                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5176                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5177                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5178                 </fields>
5179                 <links>
5180                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5181                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5182                 </links>
5183                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5184                         <actions>
5185                                 <create permission="ADMIN_SERIAL_STREAM">
5186                                         <context link="stream" jump="distribution" field="holding_lib" />
5187                                 </create>
5188                                 <retrieve permission="RECEIVE_SERIAL">
5189                                         <context link="stream" jump="distribution" field="holding_lib" />
5190                                 </retrieve>
5191                                 <update permission="ADMIN_SERIAL_STREAM">
5192                                         <context link="stream" jump="distribution" field="holding_lib" />
5193                                 </update>
5194                                 <delete permission="ADMIN_SERIAL_STREAM">
5195                                         <context link="stream" jump="distribution" field="holding_lib" />
5196                                 </delete>
5197                         </actions>
5198                 </permacrud>
5199         </class>
5200
5201         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5202                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5203                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5204                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5205                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5206                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5207                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5208                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5209                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5210                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5211                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5212                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5213                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5214                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5215                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5216                 </fields>
5217                 <links>
5218                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5219                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5220                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5221                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5222                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5223                 </links>
5224                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5225                         <actions>
5226                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5227                                         <context link="subscription" field="owning_lib" />
5228                                 </create>
5229                                 <retrieve/>
5230                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5231                                         <context link="subscription" field="owning_lib" />
5232                                 </update>
5233                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5234                                         <context link="subscription" field="owning_lib" />
5235                                 </delete>
5236                         </actions>
5237                 </permacrud>
5238         </class>
5239
5240         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5241                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5242                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5243                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5244                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5245                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5246                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5247                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5248                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5249                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5250                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5251                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5252                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5253                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5254                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5255                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5256                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5257                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5258                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5259                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5260                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5261                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5262                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5263                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5264                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5265                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5266                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5267                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5268                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5269                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5270                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5271                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5272                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5273                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5274                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5275                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5276                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5277                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5278                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5279                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5280                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5281                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5282                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5283                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5284                 </fields>
5285                 <links>
5286                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5287                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5288                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5289                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5290                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5291                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5292                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5293                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5294                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5295                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5296                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5297                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5298                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5299                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5300                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5301                 </links>
5302                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5303                         <actions>
5304                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5305                                 <retrieve/>
5306                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5307                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5308                         </actions>
5309                 </permacrud>
5310         </class>
5311
5312         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5313                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5314                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5315                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5316                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5317                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5318                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5319                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5320                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5321                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5322                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5323                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5324                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5325                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5326                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5327                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5328                 </fields>
5329                 <links>
5330                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5331                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5332                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5333                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5334                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5335                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5336                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5337                 </links>
5338                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5339                         <actions>
5340                                 <create permission="ADMIN_SERIAL_ITEM">
5341                                         <context link="stream" jump="distribution" field="holding_lib" />
5342                                 </create>
5343                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5344                                         <context link="stream" jump="distribution" field="holding_lib" />
5345                                 </retrieve>
5346                                 <update permission="ADMIN_SERIAL_ITEM">
5347                                         <context link="stream" jump="distribution" field="holding_lib" />
5348                                 </update>
5349                                 <delete permission="ADMIN_SERIAL_ITEM">
5350                                         <context link="stream" jump="distribution" field="holding_lib" />
5351                                 </delete>
5352                         </actions>
5353                 </permacrud>
5354         </class>
5355
5356         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5357                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5358                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5359                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5360                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5361                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5362                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5363                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5364                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5365                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5366                 </fields>
5367                 <links>
5368                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5369                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5370                 </links>
5371                 <!-- Not available via PCRUD at this time -->
5372         </class>
5373         <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">
5374                 <fields>
5375                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5376                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5377                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5378                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5379                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5380                 </fields>
5381                 <links>
5382                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5383                 </links>
5384         </class>
5385         <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">
5386                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5387                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5388                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5389                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5390                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5391                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5392                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5393                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5394                 </fields>
5395                 <links>
5396                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5397                 </links>
5398         </class>
5399         <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">
5400                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5401                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5402                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5403                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5404                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5405                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5406                 </fields>
5407                 <links>
5408                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5409                 </links>
5410                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5411                         <actions>
5412                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5413                                         <context link="distribution" field="holding_lib" />
5414                                 </create>
5415                                 <retrieve/>
5416                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5417                                         <context link="distribution" field="holding_lib" />
5418                                 </update>
5419                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5420                                         <context link="distribution" field="holding_lib" />
5421                                 </delete>
5422                         </actions>
5423                 </permacrud>
5424         </class>
5425
5426         <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">
5427                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5428                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5429                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5430                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5431                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5432                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5433                 </fields>
5434                 <links>
5435                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5436                 </links>
5437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5438                         <actions>
5439                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5440                                         <context link="distribution" field="holding_lib" />
5441                                 </create>
5442                                 <retrieve/>
5443                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5444                                         <context link="distribution" field="holding_lib" />
5445                                 </update>
5446                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5447                                         <context link="distribution" field="holding_lib" />
5448                                 </delete>
5449                         </actions>
5450                 </permacrud>
5451         </class>
5452
5453         <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">
5454                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5455                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5456                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5457                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5458                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5459                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5460                 </fields>
5461                 <links>
5462                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5463                 </links>
5464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5465                         <actions>
5466                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5467                                         <context link="distribution" field="holding_lib" />
5468                                 </create>
5469                                 <retrieve/>
5470                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5471                                         <context link="distribution" field="holding_lib" />
5472                                 </update>
5473                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5474                                         <context link="distribution" field="holding_lib" />
5475                                 </delete>
5476                         </actions>
5477                 </permacrud>
5478         </class>
5479
5480         <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">
5481                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5482                         <field name="id" reporter:datatype="id" />
5483                         <field name="owning_copy" reporter:datatype="link"/>
5484                         <field name="stat_cat" reporter:datatype="link"/>
5485                         <field name="stat_cat_entry" reporter:datatype="link"/>
5486                 </fields>
5487                 <links>
5488                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5489                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5490                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5491                 </links>
5492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5493                         <actions>
5494                                 <retrieve/>
5495                         </actions>
5496                 </permacrud>
5497         </class>
5498         <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">
5499                 <fields oils_persist:primary="code">
5500                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5501                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5502                 </fields>
5503                 <links/>
5504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5505             <actions>
5506                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5507                 <retrieve/>
5508                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5509                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5510             </actions>
5511         </permacrud>
5512         </class>
5513         <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">
5514                 <fields oils_persist:primary="code">
5515                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5516                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5517                 </fields>
5518                 <links/>
5519         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5520             <actions>
5521                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5522                 <retrieve/>
5523                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5524                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5525             </actions>
5526         </permacrud>
5527         </class>
5528         <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">
5529                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5530                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5531                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5532                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5533                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5534                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5535                 </fields>
5536                 <links>
5537             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5538         </links>
5539         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5540             <actions>
5541                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5542                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5543                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5544                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5545             </actions>
5546         </permacrud>
5547         </class>
5548         <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">
5549                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5550                         <field name="id" reporter:datatype="id" />
5551                         <field name="name" reporter:datatype="text"/>
5552                 </fields>
5553                 <links/>
5554         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5555             <actions>
5556                 <create permission="CREATE_LASSO" global_required="true"/>
5557                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5558                 <update permission="UPDATE_LASSO" global_required="true"/>
5559                 <delete permission="DELETE_LASSO" global_required="true"/>
5560             </actions>
5561         </permacrud>
5562         </class>
5563         <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">
5564                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5565                         <field name="id" reporter:datatype="id" />
5566                         <field name="lasso" reporter:datatype="link"/>
5567                         <field name="org_unit" reporter:datatype="org_unit"/>
5568                 </fields>
5569                 <links>
5570                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5571                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5572                 </links>
5573         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5574             <actions>
5575                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5576                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5577                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5578                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5579             </actions>
5580         </permacrud>
5581         </class>
5582         <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">
5583                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5584                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5585                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5586                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5587                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5588                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5589                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5590                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5591                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5592                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5593                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5594                 </fields>
5595                 <links>
5596                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5597                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5598                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5599                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5600                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5601                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5602                 </links>
5603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5604             <actions>
5605                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5606                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5607                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5608                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5609             </actions>
5610         </permacrud>
5611         </class>
5612         <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">
5613                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5614                         <field name="id" reporter:datatype="id" />
5615                         <field name="from_org" reporter:datatype="org_unit"/>
5616                         <field name="to_org" reporter:datatype="org_unit"/>
5617                         <field name="prox" reporter:datatype="int" />
5618                 </fields>
5619                 <links>
5620                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5621                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5622                 </links>
5623         </class>
5624         <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">
5625                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5626                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5627                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5628                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5629                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5630                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5631                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5632                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5633                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5634                 </fields>
5635                 <links/>
5636         </class>
5637         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5638                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5639                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5640                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5641                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5642                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5643                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5644                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5645                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5646                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5647                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5648                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5649                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5650                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5651                 </fields>
5652                 <links>
5653                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5654                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5655                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5656                 </links>
5657         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5658             <actions>
5659                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5660                 <retrieve/>
5661                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5662                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5663             </actions>
5664         </permacrud>
5665         </class>
5666         <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">
5667                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5668                         <field name="address_type"  reporter:datatype="text"/>
5669                         <field name="city"  reporter:datatype="text"/>
5670                         <field name="country"  reporter:datatype="text"/>
5671                         <field name="county"  reporter:datatype="text"/>
5672                         <field name="id" reporter:datatype="id" />
5673                         <field name="org_unit" reporter:datatype="org_unit"/>
5674                         <field name="post_code"  reporter:datatype="text"/>
5675                         <field name="state"  reporter:datatype="text"/>
5676                         <field name="street1"  reporter:datatype="text"/>
5677                         <field name="street2"  reporter:datatype="text"/>
5678                         <field name="valid" reporter:datatype="bool"/>
5679                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5680                 </fields>
5681                 <links>
5682                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5683                 </links>
5684         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5685             <actions>
5686                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5687                 <retrieve/>
5688                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5689                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5690             </actions>
5691         </permacrud>
5692         </class>
5693         <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">
5694                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5695                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5696                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5697                         <field name="query_text" reporter:datatype="text"/>
5698                 </fields>
5699         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5700             <actions>
5701                 <retrieve/>
5702             </actions>
5703         </permacrud>
5704         </class>
5705
5706         <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">
5707                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5708                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5709                         <field name="owner" reporter:datatype="org_unit"/>
5710                         <field name="code" reporter:datatype="text"/>
5711                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5712                         <field name="create_date" reporter:datatype="timestamp"/>
5713                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5714                 </fields>
5715                 <links>
5716                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5717                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5718                 </links>
5719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5720             <actions>
5721                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5722                 <retrieve/>
5723                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5724                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5725             </actions>
5726         </permacrud>
5727         </class>
5728         <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">
5729                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5730                         <field name="id" reporter:datatype="id"/>
5731                         <field name="grp" reporter:datatype="link"/>
5732                         <field name="pos" reporter:datatype="int"/>
5733                         <field name="query" reporter:datatype="link"/>
5734                 </fields>
5735                 <links>
5736                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5737                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5738                 </links>
5739         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5740             <actions>
5741                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5742                     <context link="grp" field="owner"/>
5743                 </create>
5744                 <retrieve/>
5745                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5746                     <context link="grp" field="owner"/>
5747                 </update>
5748                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5749                     <context link="grp" field="owner"/>
5750                 </delete>
5751             </actions>
5752         </permacrud>
5753         </class>
5754
5755         <!-- A note: Please update alhr and ahopl when updating ahr -->
5756         <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">
5757                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5758                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5759                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5760                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5761                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5762                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5763                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5764                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5765                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5766                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5767                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5768                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5769                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5770                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5771                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5772                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5773                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5774                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5775                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5776                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5777                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5778                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5779                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5780                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5781                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5782                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5783                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5784                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5785                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5786                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5787                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5788                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5789                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5790                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5791                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5792                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5793                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5794                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5795                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5796                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5797                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5798                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5799                 </fields>
5800                 <links>
5801                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5802                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5803                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5804                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5805                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5806                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5807                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5808                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5809                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5810                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5811                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5812                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5813                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5814                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5815                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5816                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5817                 </links>
5818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5819                         <actions>
5820                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5821                         </actions>
5822                 </permacrud>
5823         </class>
5824         <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">
5825                 <oils_persist:source_definition><![CDATA[
5826                 SELECT
5827                         ahr.*,
5828                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5829                                 copy_location_order_position,
5830                         CASE WHEN au.alias IS NOT NULL THEN
5831                                 au.alias
5832                         ELSE
5833                                 au.first_given_name
5834                         END AS usr_alias_or_first_given_name,
5835                         au.first_given_name AS usr_first_given_name,
5836                         au.second_given_name AS usr_second_given_name,
5837                         au.family_name AS usr_family_name,
5838                         au.prefix AS usr_prefix,
5839                         au.suffix AS usr_suffix,
5840                         au.alias AS usr_alias,
5841                         CASE WHEN au.alias IS NOT NULL THEN
5842                                 au.alias
5843                         ELSE
5844                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5845                                         COALESCE(au.family_name, ''),
5846                                         COALESCE(au.suffix, ''),
5847                                         ', ',
5848                                         COALESCE(au.prefix, ''),
5849                                         COALESCE(au.first_given_name, ''),
5850                                         COALESCE(au.second_given_name, '')
5851                                 ], ' '), E'\\s+,', ',')
5852                         END AS usr_alias_or_display_name,
5853                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5854                                 COALESCE(au.family_name, ''),
5855                                 COALESCE(au.suffix, ''),
5856                                 ', ',
5857                                 COALESCE(au.prefix, ''),
5858                                 COALESCE(au.first_given_name, ''),
5859                                 COALESCE(au.second_given_name, '')
5860                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5861                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5862                                 AS call_number_label,
5863                         siss.label AS issuance_label,
5864                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5865                         ahcm_1.copy_count AS potential_copies
5866                 FROM action.hold_request ahr
5867                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5868                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5869                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5870                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5871                 JOIN actor.usr au ON (au.id = ahr.usr)
5872                 JOIN (
5873                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5874                         FROM asset.copy_location
5875                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5876                 LEFT JOIN actor.usr_standing_penalty ausp 
5877                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5878                 LEFT JOIN config.standing_penalty csp
5879                         ON (
5880                                 csp.id = ausp.standing_penalty AND 
5881                                 csp.block_list LIKE '%CAPTURE%' AND (
5882                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5883                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5884                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5885                                         )
5886                                 )
5887                         )
5888                 JOIN (
5889                         SELECT COUNT(target_copy) AS copy_count, hold
5890                         FROM action.hold_copy_map
5891                         GROUP BY 2
5892                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5893                 LEFT JOIN serial.issuance siss
5894                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5895                 LEFT JOIN asset.copy_location_order acplo
5896                         ON (acp.location = acplo.location AND
5897                                 acp.circ_lib = acplo.org)
5898                 WHERE
5899                         ahr.capture_time IS NULL AND
5900                         ahr.cancel_time IS NULL AND
5901                         csp.id IS NULL AND
5902                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5903                         acp.status IN (0,7)
5904                 ]]></oils_persist:source_definition>
5905                 <fields oils_persist:primary="id">
5906                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5907                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5908                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5909                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5910                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5911                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5912                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5913                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5914                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5915                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5916                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5917                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5918                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5919                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5920                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5921                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5922                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5923                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5924                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5925                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5926                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5927                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5928                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5929                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5930                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5931                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5932                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5933                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5934                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5935                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5936                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5937                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5938                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5939                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5940                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5941                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5942                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5943                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5944                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5945                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5946                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5947                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5948                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5949                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5950                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5951                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5952                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5953                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5954                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5955                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5956                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5957                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5958                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5959                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5960                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5961                 </fields>
5962                 <links>
5963                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5964                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5965                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5966                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5967                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5968                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5969                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5970                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5971                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5972                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5973                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5974                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5975                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5976                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5977                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5978                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5979                 </links>
5980                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5981                         <actions>
5982                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5983                         </actions>
5984                 </permacrud>
5985         </class>
5986         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5987                 <oils_persist:source_definition>
5988                         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)
5989                 </oils_persist:source_definition>
5990                 <fields oils_persist:primary="id">
5991                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5992                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5993                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5994                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5995                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5996                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5997                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5998                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5999                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6000                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6001                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6002                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6003                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6004                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6005                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6006                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6007                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6008                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6009                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6010                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6011                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6012                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6013                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6014                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6015                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6016                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6017                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6018                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6019                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6020                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6021                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6022                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6023                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6024                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6025                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6026                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6027                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6028                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6029                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6030                 </fields>
6031                 <links>
6032                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6033                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6034                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6035                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6036                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6037                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6038                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6039                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6040                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6041                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6042                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6043                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6044                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6045                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6046                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6047                 </links>
6048         </class>
6049
6050         <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">
6051                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6052                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6053                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6054                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6055                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6056                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6057                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6058                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6059                 </fields>
6060                 <links>
6061                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6062                 </links>
6063                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6064                         <actions>
6065                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6066                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6067                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6068                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6069                         </actions>
6070                 </permacrud>
6071         </class>
6072         <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">
6073                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6074                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6075                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6076                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6077                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6078                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6079                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6080                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6081                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6082                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6083                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6084                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6085                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6086                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6087                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6088                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6089                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6090                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6091                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6092                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6093                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6094                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6095                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6096                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6097                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6098                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6099                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6100                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6101                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6102                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6103                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6104                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6105                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6106                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6107                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6108                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6109                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6110                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6111                 </fields>
6112                 <links>
6113                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6114                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6115                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6116                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6117                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6118                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6119                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6120                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6121                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6122                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6123                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6124                 </links>
6125                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6126                         <actions>
6127                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6128                         </actions>
6129                 </permacrud>
6130         </class>
6131         <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">
6132                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6133                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6134                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6135                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6136                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6137                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6138                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6139                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6140                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6141                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6142                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6143                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6144                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6145                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6146                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6147                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6148                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6149                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6150                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6151                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6152                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6153                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6154                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6155                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6156                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6157                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6158                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6159                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6160                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6161                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6162                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6163                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6164                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6165                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6166                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6167                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6168                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6169                 </fields>
6170                 <links>
6171                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6172                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6173                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6174                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6175                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6176                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6177                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6178                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6179                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6180                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6181                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6182                 </links>
6183                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6184                         <actions>
6185                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6186                         </actions>
6187                 </permacrud>
6188         </class>
6189
6190         <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">
6191                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6192                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6193                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6194                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6195                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6196                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6197                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6198                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6199                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6200                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6201                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6202                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6203                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6204                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6205                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6206                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6207                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6208                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6209                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6210                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6211                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6212                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6213                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6214                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6215                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6216                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6217                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6218                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6219                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6220                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6221                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6222                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6223                 </fields>
6224                 <links>
6225                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6226                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6227                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6228                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6229                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6230                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6231                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6232                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6233                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6234                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6235                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6236                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6237                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6238                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6239                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6240                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6241                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6242                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6243                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6244                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6245                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6246                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6247                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6248                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6249                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6250                 </links>
6251         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6252             <actions>
6253                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6254                 <retrieve />
6255                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6256                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6257             </actions>
6258         </permacrud>
6259         </class>
6260         <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">
6261                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6262                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6263                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6264                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6265                 </fields>
6266                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6267                         <actions>
6268                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6269                                 <retrieve/>
6270                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6271                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6272                         </actions>
6273                 </permacrud>
6274         </class>
6275         <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">
6276                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6277                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6278                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6279                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6280                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6281                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6282                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6283                 </fields>
6284                 <links>
6285                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6286                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6287                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6288                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6289                 </links>
6290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6291                         <actions>
6292                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6293                                 <retrieve/>
6294                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6295                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6296                         </actions>
6297                 </permacrud>
6298         </class>
6299         <class id="ccnb" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
6300                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6301                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6302                         <field name="btype" reporter:datatype="text"/>
6303                         <field name="id" reporter:datatype="id" />
6304                         <field name="name"  reporter:datatype="text"/>
6305                         <field name="description" reporter:datatype="text"/>
6306                         <field name="owner" reporter:datatype="link"/>
6307                         <field name="pub" reporter:datatype="bool"/>
6308                         <field name="create_time" reporter:datatype="timestamp" />
6309                 </fields>
6310                 <links>
6311                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6312                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6313                 </links>
6314         </class>
6315         <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">
6316                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6317                         <field name="id" reporter:datatype="id" />
6318                         <field name="bucket" reporter:datatype="link"/>
6319                         <field name="note" reporter:datatype="text" />
6320                 </fields>
6321                 <links>
6322                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6323                 </links>
6324         </class>
6325         <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">
6326                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6327                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6328                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6329                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6330                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6331                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6332                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6333                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6334                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6335                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6336                 </fields>
6337                 <links>
6338                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6339                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6340                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6341                 </links>
6342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6343                         <actions>
6344                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6345                         </actions>
6346                 </permacrud>
6347         </class>
6348         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6349                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6350                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6351                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6352                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6353                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6354                 </fields>
6355                 <links>
6356                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6357                 </links>
6358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6359                         <actions>
6360                                 <retrieve permission="VIEW_USER">
6361                                         <context link="usr" field="home_ou" />
6362                                 </retrieve>
6363                         </actions>
6364                 </permacrud>
6365         </class>
6366     <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">
6367         <fields oils_persist:primary="field">
6368             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6369             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6370             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6371         </fields>
6372         <links/>
6373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6374             <actions>
6375                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6376                 <retrieve />
6377                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6378                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6379             </actions>
6380         </permacrud>
6381     </class>
6382         <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">
6383                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6384                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6385                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6386                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6387                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6389                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6390                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6391                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6392                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6393                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6394                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6395                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6396                 </fields>
6397                 <links>
6398                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6399                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6400                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6401                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6402                 </links>
6403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6404             <actions>
6405                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6406                 <retrieve />
6407                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6408                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6409             </actions>
6410         </permacrud>
6411         </class>
6412         <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">
6413                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6414                         <field name="field" reporter:datatype="link"/>
6415                         <field name="id" reporter:datatype="id" />
6416                         <field name="source" reporter:datatype="link"/>
6417                         <field name="value"  reporter:datatype="text"/>
6418                 </fields>
6419                 <links>
6420                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6421                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6422                 </links>
6423         </class>
6424         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6425                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6426                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6427                         <field name="btype" reporter:datatype="text"/>
6428                         <field name="id" reporter:datatype="id" />
6429                         <field name="name"  reporter:datatype="text"/>
6430                         <field name="description" reporter:datatype="text"/>
6431                         <field name="owner" reporter:datatype="link"/>
6432                         <field name="pub" reporter:datatype="bool"/>
6433                         <field name="create_time" reporter:datatype="timestamp" />
6434                 </fields>
6435                 <links>
6436                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6437                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6438                 </links>
6439         </class>
6440         <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">
6441                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6442                         <field name="id" reporter:datatype="id" />
6443                         <field name="bucket" reporter:datatype="link"/>
6444                         <field name="note" reporter:datatype="text" />
6445                 </fields>
6446                 <links>
6447                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6448                 </links>
6449         </class>
6450         <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">
6451                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6452                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6453                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6454                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6455                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6456                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6457                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6458                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6459                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6460                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6461                 </fields>
6462                 <links>
6463                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6464                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6465                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6466                 </links>
6467         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6468             <actions>
6469                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6470                     <context link="xact" jump="usr" field="home_ou"/>
6471                 </retrieve>
6472                         </actions>
6473                 </permacrud>
6474         </class>
6475         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6476                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6477                         <field name="id" reporter:datatype="id" />
6478                         <field name="ind1" />
6479                         <field name="ind2" />
6480                         <field name="record" />
6481                         <field name="subfield" />
6482                         <field name="tag" />
6483                         <field name="value" />
6484                 </fields>
6485                 <links>
6486                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6487                 </links>
6488         </class>
6489         <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">
6490                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6491                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6492                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6493                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6494                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6495                 </fields>
6496                 <links>
6497                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6498                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6499                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6500                 </links>
6501         </class>
6502         <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">
6503                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6504                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6505                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6506                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6507                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6508                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6509                 </fields>
6510                 <links>
6511                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6512                 </links>
6513         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6514             <actions>
6515                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6516                 <retrieve/>
6517                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6518                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6519             </actions>
6520         </permacrud>
6521
6522         </class>
6523         <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">
6524                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6525                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6526                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6527                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6528                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6529                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6530                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6531                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6532                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6533                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6534                 </fields>
6535                 <links>
6536                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6537                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6538                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6539                 </links>
6540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6541             <actions>
6542                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6543                 <retrieve/>
6544                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6545                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6546             </actions>
6547         </permacrud>
6548         </class>
6549         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6550                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6551                         <field name="create_date" reporter:datatype="timestamp"/>
6552                         <field name="creator" reporter:datatype="link"/>
6553                         <field name="edit_date" reporter:datatype="timestamp"/>
6554                         <field name="editor" reporter:datatype="link"/>
6555                         <field name="id" reporter:datatype="id" />
6556                         <field name="pub" reporter:datatype="bool"/>
6557                         <field name="record" reporter:datatype="link"/>
6558                         <field name="value"  reporter:datatype="text"/>
6559                 </fields>
6560                 <links>
6561                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6562                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6563                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6564                 </links>
6565         </class>
6566         <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">
6567                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6568                         <field name="balance_owed" reporter:datatype="money" />
6569                         <field name="total_owed" reporter:datatype="money" />
6570                         <field name="total_paid" reporter:datatype="money" />
6571                         <field name="usr" reporter:datatype="link"/>
6572                 </fields>
6573                 <links>
6574                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6575                 </links>
6576         </class>
6577     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6578                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6579                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6580                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6581                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6582                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6583                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6584                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6585                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6586                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6587                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6588                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6589                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6590                 </fields>
6591                 <links>
6592                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6593                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6594                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6595                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6596                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6597                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6598                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6599                 </links>
6600         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6601             <actions>
6602                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
6603             </actions>
6604         </permacrud>
6605         </class>
6606         <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">
6607                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6608                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6609                         <field name="quality" reporter:datatype="int" />
6610                         <field name="source" reporter:datatype="text"/>
6611                         <field name="transcendant" reporter:datatype="bool"/>
6612                         <field name="can_have_copies" reporter:datatype="bool"/>
6613                 </fields>
6614                 <links/>
6615         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6616             <actions>
6617                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6618                 <retrieve/>
6619                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6620                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6621             </actions>
6622         </permacrud>
6623         </class>
6624         <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">
6625                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6626                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6627                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6628                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6629                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6630                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6631                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6632                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6633                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6634                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6635                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6636                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6637                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6638                 </fields>
6639                 <links>
6640                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6641                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6642                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6643                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6644                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6645                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6646                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6647                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6648                 </links>
6649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6650                         <actions>
6651                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6652                                         <context link="usr" field="home_ou" />
6653                                 </retrieve>
6654                         </actions>
6655                 </permacrud>
6656         </class>
6657         <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">
6658                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6659                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6660                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6661                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6662                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6663                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6664                 </fields>
6665                 <links>
6666                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6667                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6668                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6669                 </links>
6670         </class>
6671         <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">
6672                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6673                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6674                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6675                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6676                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6677                 </fields>
6678                 <links>
6679                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6680                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6681                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6682                 </links>
6683         </class>
6684         <class id="cubi" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
6685                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6686                         <field name="bucket" reporter:datatype="link"/>
6687                         <field name="id" reporter:datatype="id" />
6688                         <field name="target_user" reporter:datatype="link"/>
6689                         <field name="create_time" reporter:datatype="timestamp" />
6690                         <field name="pos" reporter:datatype="int" />
6691                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6692                 </fields>
6693                 <links>
6694                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6695                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6696             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6697                 </links>
6698         </class>
6699         <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">
6700                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6701                         <field name="id" reporter:datatype="id" />
6702                         <field name="item" reporter:datatype="link"/>
6703                         <field name="note" reporter:datatype="text" />
6704                 </fields>
6705                 <links>
6706                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6707                 </links>
6708         </class>
6709         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6710                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6711                         <field name="balance_owed" reporter:datatype="money" />
6712                         <field name="total_owed" reporter:datatype="money" />
6713                         <field name="total_paid" reporter:datatype="money" />
6714                         <field name="usr" reporter:datatype="link"/>
6715                 </fields>
6716                 <links>
6717                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6718                 </links>
6719         </class>
6720         <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">
6721                 <fields oils_persist:primary="code" oils_persist:sequence="">
6722                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6723                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6724                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6725                 </fields>
6726                 <links/>
6727         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6728             <actions>
6729                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6730                 <retrieve/>
6731                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6732                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6733             </actions>
6734         </permacrud>
6735         </class>
6736         <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">
6737                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6738                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6739                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6740                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6741                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6742                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6743                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6744                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6745                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6746                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6747                 </fields>
6748                 <links>
6749                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6750                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6751                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6752                 </links>
6753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6754             <actions>
6755                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6756                     <context link="xact" jump="usr" field="home_ou"/>
6757                 </retrieve>
6758                         </actions>
6759                 </permacrud>
6760         </class>
6761         <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">
6762                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6763                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6764                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6765                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6766                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6767                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6768                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6769                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6770                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6771                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6772                 </fields>
6773                 <links>
6774                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6775                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6776                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6777                 </links>
6778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6779             <actions>
6780                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6781                     <context link="xact" jump="usr" field="home_ou"/>
6782                 </retrieve>
6783                         </actions>
6784                 </permacrud>
6785         </class>
6786         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6787                 <fields oils_persist:primary="id" oils_persist:sequence="">
6788                         <field name="checkin_lib" reporter:datatype="link"/>
6789                         <field name="checkin_staff" reporter:datatype="link"/>
6790                         <field name="checkin_time" reporter:datatype="timestamp"/>
6791                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6792                         <field name="circ_staff" reporter:datatype="link"/>
6793                         <field name="desk_renewal" reporter:datatype="bool"/>
6794                         <field name="due_date" reporter:datatype="timestamp"/>
6795                         <field name="duration" reporter:datatype="interval"/>
6796                         <field name="duration_rule" reporter:datatype="link"/>
6797                         <field name="fine_interval" reporter:datatype="interval"/>
6798                         <field name="id" reporter:datatype="id" />
6799                         <field name="max_fine" reporter:datatype="money" />
6800                         <field name="max_fine_rule" reporter:datatype="link"/>
6801                         <field name="opac_renewal" reporter:datatype="bool"/>
6802                         <field name="phone_renewal" reporter:datatype="bool"/>
6803                         <field name="recurring_fine" reporter:datatype="money" />
6804                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6805                         <field name="renewal_remaining" reporter:datatype="int" />
6806             <field name="grace_period" reporter:datatype="interval" />
6807                         <field name="stop_fines" reporter:datatype="text"/>
6808                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6809                         <field name="target_copy" reporter:datatype="link"/>
6810                         <field name="usr" reporter:datatype="link"/>
6811                         <field name="xact_finish" reporter:datatype="timestamp" />
6812                         <field name="xact_start" reporter:datatype="timestamp" />
6813                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6814                 </fields>
6815                 <links>
6816                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6817                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6818                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6819                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6820                 </links>
6821         </class>
6822         <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">
6823                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6824                         <field name="field" reporter:datatype="link"/>
6825                         <field name="id" reporter:datatype="id" />
6826                         <field name="source" reporter:datatype="link"/>
6827                         <field name="value" reporter:datatype="text"/>
6828                 </fields>
6829                 <links>
6830                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6831                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6832                 </links>
6833         </class>
6834         <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">
6835                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6836                         <field name="high" reporter:datatype="money" />
6837                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6838                         <field name="low" reporter:datatype="money" />
6839                         <field name="name" reporter:datatype="text"/>
6840                         <field name="normal" reporter:datatype="money" />
6841                         <field name="recurrence_interval" reporter:datatype="interval"/>
6842             <field name="grace_period" reporter:datatype="interval" />
6843                 </fields>
6844                 <links/>
6845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6846             <actions>
6847                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6848                 <retrieve/>
6849                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6850                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6851             </actions>
6852         </permacrud>
6853         </class>
6854         <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">
6855                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6856                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6857                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6858                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6859                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6860                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6861                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6862                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6863                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6864                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6865                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6866                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6867                 </fields>
6868                 <links>
6869                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6870                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6871                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6872                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6873                 </links>
6874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6875             <actions>
6876                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6877                     <context link="xact" jump="usr" field="home_ou"/>
6878                 </retrieve>
6879                         </actions>
6880                 </permacrud>
6881         </class>
6882         <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">
6883                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6884                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6885                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6886                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6887                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6888                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6889                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6890                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6891                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6892                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6893                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6894                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6895                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6896                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6897                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6898                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6899                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6900                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6901                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6902                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6903                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6904                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6905                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6906                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6907                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6908                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6909                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6910                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6911                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6912                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6913                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6914                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6915                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6916                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6917                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6918                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6919                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6920                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6921                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6922                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6923                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6924                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6925                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6926                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6927                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6928                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6929                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6930                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6931                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6932                 </fields>
6933                 <links>
6934                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6935                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6936                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6937                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6938                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6939                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6940                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6941                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6942                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6943                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6944                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6945                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6946                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6947                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6948                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6949                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6950                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6951                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6952                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6953                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6954                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6955                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6956                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
6957                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
6958                 </links>
6959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6960             <actions>
6961                 <create permission="CREATE_COPY">
6962                     <context link="call_number" field="owning_lib"/>
6963                 </create>
6964                 <retrieve/>
6965                 <update permission="UPDATE_COPY">
6966                     <context link="call_number" field="owning_lib"/>
6967                 </update>
6968                 <delete permission="DELETE_COPY">
6969                     <context link="call_number" field="owning_lib"/>
6970                 </delete>
6971             </actions>
6972         </permacrud>
6973         </class>
6974
6975         <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">
6976                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6977                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6978                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
6979                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6980                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6981                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6982                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6983                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6984                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
6985                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6986                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6987                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6988                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6989                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
6990                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6991                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6992                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6993                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6994                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6995                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6996                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6997                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
6998                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6999                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7000                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7001                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7002                 </fields>
7003                 <links>
7004                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7005                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7006                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7007                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7008                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7009                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7010                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7011                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7012                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7013                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7014                 </links>
7015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7016                         <actions>
7017                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7018                                 <retrieve />
7019                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7020                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7021                         </actions>
7022                 </permacrud>
7023         </class>
7024
7025         <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">
7026                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7027                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7028                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7029                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7030                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7031                 </fields>
7032                 <links/>
7033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7034             <actions>
7035                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7036                 <retrieve/>
7037                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7038                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7039             </actions>
7040         </permacrud>
7041         </class>
7042         <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">
7043                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7044                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7045                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7046                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7047                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7048                 </fields>
7049                 <links/>
7050         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7051             <actions>
7052                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7053                 <retrieve/>
7054                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7055                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7056             </actions>
7057         </permacrud>
7058         </class>
7059         <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">
7060                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7061                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7062                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7063                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7064                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7065                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7066                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7067                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7068                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7069                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7070                 </fields>
7071                 <links>
7072                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7073                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7074                 </links>
7075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7076             <actions>
7077                 <create permission="CREATE_PERM" global_required="true"/>
7078                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7079                 <update permission="UPDATE_PERM" global_required="true"/>
7080                 <delete permission="DELETE_PERM" global_required="true"/>
7081             </actions>
7082         </permacrud>
7083         </class>
7084         <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">
7085                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7086                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7087                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7088                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7089                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7090                 </fields>
7091                 <links>
7092                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7093                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7094                 </links>
7095         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7096             <actions>
7097                 <create permission="ADMIN_SURVEY">
7098                     <context link="question" jump="survey" field="owner"/>
7099                 </create>
7100                 <retrieve/>
7101                 <update permission="ADMIN_SURVEY">
7102                     <context link="question" jump="survey" field="owner"/>
7103                 </update>
7104                 <delete permission="ADMIN_SURVEY">
7105                     <context link="question" jump="survey" field="owner"/>
7106                 </delete>
7107             </actions>
7108         </permacrud>
7109         </class>
7110         <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">
7111                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7112                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7113                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7114                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7115                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7116                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7117                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7118                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7119                 </fields>
7120                 <links>
7121                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7122                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7123                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7124                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7125                 </links>
7126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7127                         <actions>
7128                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7129                         </actions>
7130                 </permacrud>
7131         </class>
7132         <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">
7133                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7134                         <field name="balance_owed" reporter:datatype="money" />
7135                         <field name="total_owed" reporter:datatype="money" />
7136                         <field name="total_paid" reporter:datatype="money" />
7137                         <field name="usr" reporter:datatype="link"/>
7138                 </fields>
7139                 <links>
7140                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7141                 </links>
7142         </class>
7143         <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">
7144                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7145                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7146                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7147                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7148                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7149                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7150                 </fields>
7151                 <links>
7152                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7153                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7154                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7155                 </links>
7156         </class>
7157         <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">
7158                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7159                         <field name="field" reporter:datatype="link"/>
7160                         <field name="id" reporter:datatype="id" />
7161                         <field name="source" reporter:datatype="link"/>
7162                         <field name="value" reporter:datatype="text"/>
7163                 </fields>
7164                 <links>
7165                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7166                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7167                 </links>
7168         </class>
7169         <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">
7170                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7171                         <field name="field" reporter:datatype="link"/>
7172                         <field name="id" reporter:datatype="id" />
7173                         <field name="source" reporter:datatype="link"/>
7174                         <field name="value" reporter:datatype="text"/>
7175                 </fields>
7176                 <links>
7177                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7178                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7179                 </links>
7180         </class>
7181         <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">
7182                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7183                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7184                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7185                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7186                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7187                 </fields>
7188                 <links>
7189                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7190                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7191                 </links>
7192         </class>
7193         <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">
7194                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7195                         <field name="depth" reporter:datatype="int" />
7196                         <field name="grantable" reporter:datatype="bool"/>
7197                         <field name="grp" reporter:datatype="link"/>
7198                         <field name="id" reporter:datatype="id" />
7199                         <field name="perm" reporter:datatype="link"/>
7200                 </fields>
7201                 <links>
7202                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7203                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7204                 </links>
7205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7206             <actions>
7207                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7208                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7209                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7210                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7211             </actions>
7212         </permacrud>
7213         </class>
7214         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7215                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7216                         <field name="items" oils_persist:virtual="true" />
7217                         <field name="btype" reporter:datatype="text"/>
7218                         <field name="id" reporter:datatype="id" />
7219                         <field name="name" reporter:datatype="text"/>
7220                         <field name="description" reporter:datatype="text"/>
7221                         <field name="owner" reporter:datatype="link"/>
7222                         <field name="pub" reporter:datatype="bool"/>
7223                         <field name="create_time" reporter:datatype="timestamp" />
7224                 </fields>
7225                 <links>
7226                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7227                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7228                 </links>
7229         </class>
7230         <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">
7231                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7232                         <field name="id" reporter:datatype="id" />
7233                         <field name="bucket" reporter:datatype="link"/>
7234                         <field name="note" reporter:datatype="text" />
7235                 </fields>
7236                 <links>
7237                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7238                 </links>
7239         </class>
7240         <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">
7241                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7242                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7243                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7244                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7245                 </fields>
7246                 <links>
7247                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7248                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7249                 </links>
7250         </class>
7251         <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">
7252                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7253                         <field name="depth" reporter:datatype="int"/>
7254                         <field name="grantable" reporter:datatype="bool"/>
7255                         <field name="id" reporter:datatype="id" />
7256                         <field name="perm" reporter:datatype="link"/>
7257                         <field name="usr" reporter:datatype="link"/>
7258                 </fields>
7259                 <links>
7260                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7261                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7262                 </links>
7263         </class>
7264         <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">
7265                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7266                         <field name="object_id" reporter:datatype="text"/>
7267                         <field name="grantable" reporter:datatype="bool"/>
7268                         <field name="id" reporter:datatype="id" />
7269                         <field name="perm" reporter:datatype="link"/>
7270                         <field name="usr" reporter:datatype="link"/>
7271                         <field name="object_type" reporter:datatype="text"/>
7272                 </fields>
7273                 <links>
7274                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7275                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7276                 </links>
7277         </class>
7278         <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">
7279                 <fields oils_persist:primary="id" oils_persist:sequence="">
7280                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7281                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7282                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7283                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7284                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7285                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7286                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7287                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7288                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7289                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7290                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7291                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7292                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7293                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7294                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7295                 </fields>
7296                 <links>
7297                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7298                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7299                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7300                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7301                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7302                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7303                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7304                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7305                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7306                 </links>
7307         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7308             <actions>
7309                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7310                     <context link="xact" jump="usr" field="home_ou"/>
7311                 </retrieve>
7312                         </actions>
7313                 </permacrud>
7314         </class>
7315         <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
7316                 <fields oils_persist:primary="id" oils_persist:sequence="">
7317                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7318                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7319                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7320                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7321                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7322                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7323                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7324                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7325                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7326                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7327                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7328                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7329                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7330                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7331                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7332                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7333                 </fields>
7334                 <links>
7335                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7336                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7337                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7338                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7339                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7340                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7341                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7342                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7343                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7344                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7345                 </links>
7346         </class>
7347         <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">
7348                 <fields oils_persist:primary="id" oils_persist:sequence="">
7349                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7350                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7351                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7352                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7353                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7354                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7355                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7356                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7357                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7358                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7359                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7360                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7361                 </fields>
7362                 <links>
7363                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7364                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7365                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7366                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7367                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7368                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7369                 </links>
7370         </class>
7371         <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">
7372                 <fields oils_persist:primary="id" oils_persist:sequence="">
7373                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7374                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7375                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7376                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7377                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7378                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7379                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7380                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7381                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7382                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7383                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7384                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7385                 </fields>
7386                 <links>
7387                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7388                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7389                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7390                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7391                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7392                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7393                 </links>
7394         </class>
7395         <class id="cbrebi" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">
7396                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7397                         <field name="bucket" reporter:datatype="link"/>
7398                         <field name="id" reporter:datatype="id" />
7399                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7400                         <field name="create_time" reporter:datatype="timestamp" />
7401                         <field name="pos" reporter:datatype="int" />
7402                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7403                 </fields>
7404                 <links>
7405                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7406                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7407             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7408                 </links>
7409         </class>
7410         <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">
7411                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7412                         <field name="id" reporter:datatype="id" />
7413                         <field name="item" reporter:datatype="link"/>
7414                         <field name="note" reporter:datatype="text" />
7415                 </fields>
7416                 <links>
7417                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7418                 </links>
7419         </class>
7420         <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">
7421                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7422                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7423                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7424                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7425                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7426                 </fields>
7427                 <links>
7428                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7429                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7430                 </links>
7431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7432                         <actions>
7433                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7434                         </actions>
7435                 </permacrud>
7436         </class>
7437     <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">
7438         <fields oils_persist:primary="field">
7439             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7440             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7441             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7442         </fields>
7443         <links/>
7444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7445             <actions>
7446                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7447                 <retrieve />
7448                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7449                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7450             </actions>
7451         </permacrud>
7452     </class>
7453         <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">
7454                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7455                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7456                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7457                 </fields>
7458                 <links/>
7459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7460             <actions>
7461                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7462                 <retrieve/>
7463                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7464                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7465             </actions>
7466         </permacrud>
7467         </class>
7468
7469
7470         <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">
7471                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7472                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7473                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7474                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7475                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7476                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7477                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7478                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7479                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7480                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7481                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7482                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7483                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7484                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7485                 </fields>
7486                 <links>
7487                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7488                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7489                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7490                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7491                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7492                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7493                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7494                 </links>
7495         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7496             <actions>
7497                 <create permission="TRANSIT_COPY">
7498                     <context link="target_copy" field="owner"/>
7499                 </create>
7500                 <retrieve/>
7501                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7502                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7503             </actions>
7504         </permacrud>
7505         </class>
7506         <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">
7507                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7508                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7509                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7510                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7511                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7512                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7513                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7514                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7515                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7516                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7517                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7518                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7519                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7520                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7521                 </fields>
7522                 <links>
7523                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7524                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7525                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7526                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7527                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7528                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7529                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7530                 </links>
7531         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7532             <actions>
7533                 <create permission="TRANSIT_COPY" context_field="owner">
7534                     <context link="target_copy" field="circ_lib"/>
7535                 </create>
7536                 <retrieve/>
7537                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7538                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7539             </actions>
7540         </permacrud>
7541         </class>
7542         <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">
7543                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7544                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7545                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7546                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7547                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7548                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7549                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7550                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7551                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7552                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7553                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7554                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7555                 </fields>
7556                 <links>
7557                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7558                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7559                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7560                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7561                 </links>
7562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7563             <actions>
7564                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7565                     <context link="xact" jump="usr" field="home_ou"/>
7566                 </retrieve>
7567                         </actions>
7568                 </permacrud>
7569         </class>
7570         <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">
7571                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7572                         <field name="grp" />
7573                         <field name="id" reporter:datatype="id" />
7574                         <field name="usr" />
7575                 </fields>
7576                 <links>
7577                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7578                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7579                 </links>
7580         </class>
7581         <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">
7582                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7583                         <field name="id" reporter:datatype="id" />
7584                         <field name="fq_field" reporter:datatype="text"/>
7585                         <field name="identity_value" reporter:datatype="text"/>
7586                         <field name="translation" reporter:datatype="text"/>
7587                         <field name="string" reporter:datatype="text"/>
7588                 </fields>
7589                 <links>
7590                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7591                 </links>
7592         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7593             <actions>
7594                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7595                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7596                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7597                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7598             </actions>
7599         </permacrud>
7600         </class>
7601         <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">
7602                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7603                         <field name="id" reporter:datatype="id" />
7604                         <field name="fm_class" reporter:datatype="text"/>
7605                         <field name="field" reporter:datatype="text"/>
7606                         <field name="owner" reporter:datatype="org_unit"/>
7607                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7608                 </fields>
7609                 <links>
7610                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7611                 </links>
7612         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7613             <actions>
7614                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7615                 <retrieve/>
7616                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7617                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7618             </actions>
7619         </permacrud>
7620         </class>
7621         <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">
7622                 <fields oils_persist:primary="code">
7623                         <field name="code" reporter:datatype="id" />
7624                         <field name="marc_code" reporter:datatype="text"/>
7625                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7626                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7627                         <field name="rtl" reporter:datatype="bool"/>
7628                 </fields>
7629                 <links/>
7630         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7631             <actions>
7632                 <create permission="CREATE_LOCALE" global_required="true"/>
7633                 <retrieve/>
7634                 <update permission="UPDATE_LOCALE" global_required="true"/>
7635                 <delete permission="DELETE_LOCALE" global_required="true"/>
7636             </actions>
7637         </permacrud>
7638         </class>
7639         <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">
7640                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7641                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7642                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7643                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7644             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7645                 </fields>
7646                 <links>
7647                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7648                 </links>
7649         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7650             <actions>
7651                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7652                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7653                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7654                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7655             </actions>
7656         </permacrud>
7657         </class>
7658
7659         <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">
7660                 <fields oils_persist:primary="id">
7661                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7662                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7663                 </fields>
7664                 <links/>
7665         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7666             <actions>
7667                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7668                 <retrieve/>
7669                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7670                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7671             </actions>
7672         </permacrud>
7673         </class>
7674
7675         <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">
7676                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7677                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7678                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7679                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7680                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7681                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7682                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7683                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7684                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7685                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7686                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7687                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7688                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7689                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7690                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7691                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7692                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7693                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7694                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7695                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7696                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7697                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7698                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7699                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7700                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7701                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7702                 </fields>
7703                 <links>
7704                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7705                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7706                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7707                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7708                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7709                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7710                 </links>
7711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7712             <actions>
7713                 <create permission="user_request.create">
7714                     <context link="usr" field="home_ou"/>
7715                                 </create>
7716                 <retrieve permission="user_request.view">
7717                     <context link="usr" field="home_ou"/>
7718                                 </retrieve>
7719                 <update permission="user_request.update">
7720                     <context link="usr" field="home_ou"/>
7721                                 </update>
7722                 <delete permission="user_request.delete">
7723                     <context link="usr" field="home_ou"/>
7724                                 </delete>
7725             </actions>
7726         </permacrud>
7727         </class>
7728
7729         <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">
7730                 <fields oils_persist:primary="code">
7731                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7732                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7733                 </fields>
7734                 <links/>
7735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7736             <actions>
7737                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7738                 <retrieve/>
7739                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7740                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7741             </actions>
7742         </permacrud>
7743         </class>
7744
7745         <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">
7746                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7747                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7748                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7749                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7750                         <field reporter:label="Ratio" name="ratio" />
7751                 </fields>
7752                 <links>
7753                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7754                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7755                 </links>
7756                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7757                         <actions>
7758                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7759                                 <retrieve/>
7760                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7761                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7762                         </actions>
7763                 </permacrud>
7764         </class>
7765
7766         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7767                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7768                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7769                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7770                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7771                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7772                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7773                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7774                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7775                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7776                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7777                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7778                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7779                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7780                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7781                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7782                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7783                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7784                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7785                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
7786                 </fields>
7787                 <links>
7788                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7789                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7790             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7791             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7792                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7793                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
7794                 </links>
7795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7796             <actions>
7797                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7798                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7799                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7800                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7801             </actions>
7802         </permacrud>
7803         </class>
7804
7805         <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">
7806                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7807                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7808                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7809                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7810                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7811                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7812                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7813                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7814                 </fields>
7815                 <links>
7816                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7817                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7818                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7819                 </links>
7820         </class>
7821
7822         <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">
7823                 <fields oils_persist:primary="code">
7824                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7825                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7826                 </fields>
7827                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7828             <actions>
7829                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7830                 <retrieve/>
7831                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7832                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7833             </actions>
7834                 </permacrud>
7835         </class>
7836
7837         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7838                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7839                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7840                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7841                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7842                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7843                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7844                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7845                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7846                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7847                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7848                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7849                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7850                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7851                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7852                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7853                 </fields>
7854                 <links>
7855                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7856                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7857                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7858                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7859                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7860                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7861                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7862                 </links>
7863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7864             <actions>
7865                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7866                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7867                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7868                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7869             </actions>
7870         </permacrud>
7871         </class>
7872
7873         <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">
7874                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7875                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7876                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7877                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7878                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7879                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7880                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7881                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7882                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7883                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7884                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7885                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7886                 </fields>
7887                 <links>
7888                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7889                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7890                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7891                 </links>
7892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7893             <actions>
7894                 <create   permission="ADMIN_INVOICE">
7895                                         <context link="invoice" field="receiver"/>
7896                                 </create>
7897                 <retrieve permission="ADMIN_INVOICE">
7898                                         <context link="invoice" field="receiver"/>
7899                                 </retrieve>
7900                 <update   permission="ADMIN_INVOICE">
7901                                         <context link="invoice" field="receiver"/>
7902                                 </update>
7903                                 <delete   permission="ADMIN_INVOICE">
7904                                         <context link="invoice" field="receiver"/>
7905                                 </delete>
7906             </actions>
7907         </permacrud>
7908         </class>
7909
7910         <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">
7911                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7912                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7913                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7914                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7915                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7916                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7917                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7918                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7919                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7920                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7921                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7922                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7923                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7924                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7925                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7926                 </fields>
7927                 <links>
7928                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7929                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7930                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7931                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7932                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7933                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7934                 </links>
7935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7936             <actions>
7937                 <create   permission="ADMIN_INVOICE">
7938                                         <context link="invoice" field="receiver"/>
7939                                 </create>
7940                 <retrieve permission="ADMIN_INVOICE">
7941                                         <context link="invoice" field="receiver"/>
7942                                 </retrieve>
7943                 <update   permission="ADMIN_INVOICE">
7944                                         <context link="invoice" field="receiver"/>
7945                                 </update>
7946                                 <delete   permission="ADMIN_INVOICE">
7947                                         <context link="invoice" field="receiver"/>
7948                                 </delete>
7949             </actions>
7950         </permacrud>
7951         </class>
7952
7953         <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">
7954                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7955                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7956                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7957                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7958                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7959                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7960                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7961                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7962                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7963                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7964                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7965                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7966                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7967                 </fields>
7968                 <links>
7969                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7970                 </links>
7971         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7972             <actions>
7973                 <create permission="ADMIN_PROVIDER">
7974                     <context link="provider" field="owner"/>
7975                 </create>
7976                 <retrieve permission="ADMIN_PROVIDER">
7977                     <context link="provider" field="owner"/>
7978                 </retrieve>
7979                 <update permission="ADMIN_PROVIDER">
7980                     <context link="provider" field="owner"/>
7981                 </update>
7982                 <delete permission="ADMIN_PROVIDER">
7983                     <context link="provider" field="owner"/>
7984                 </delete>
7985             </actions>
7986         </permacrud>
7987         </class>
7988
7989         <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">
7990                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7991                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7992                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7993                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7994                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7995                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7996                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7997         </fields>
7998                 <links>
7999                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8000                 </links>
8001         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8002             <actions>
8003                 <create permission="ADMIN_PROVIDER">
8004                     <context link="provider" field="owner"/>
8005                 </create>
8006                 <retrieve permission="ADMIN_PROVIDER">
8007                     <context link="provider" field="owner"/>
8008                 </retrieve>
8009                 <update permission="ADMIN_PROVIDER">
8010                     <context link="provider" field="owner"/>
8011                 </update>
8012                 <delete permission="ADMIN_PROVIDER">
8013                     <context link="provider" field="owner"/>
8014                 </delete>
8015             </actions>
8016         </permacrud>
8017     </class>
8018         <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">
8019                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8020                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8021                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8022                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8023                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8024                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8025                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8026                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8027                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8028                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8029                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8030                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8031                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8032                 </fields>
8033                 <links>
8034                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8035                 </links>
8036         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8037             <actions>
8038                 <create permission="ADMIN_PROVIDER">
8039                     <context link="contact" jump='provider' field="owner"/>
8040                 </create>
8041                 <retrieve permission="ADMIN_PROVIDER">
8042                     <context link="contact" jump='provider' field="owner"/>
8043                 </retrieve>
8044                 <update permission="ADMIN_PROVIDER">
8045                     <context link="contact" jump='provider' field="owner"/>
8046                 </update>
8047                 <delete permission="ADMIN_PROVIDER">
8048                     <context link="contact" jump='provider' field="owner"/>
8049                 </delete>
8050             </actions>
8051         </permacrud>
8052         </class>
8053
8054         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8055                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8056                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8057                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8058                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8059                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8060                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8061                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8062                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8063                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8064                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8065                 </fields>
8066                 <links>
8067                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8068                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8069                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8070                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8071                 </links>
8072         </class>
8073
8074         <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">
8075                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8076                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8077                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8078                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8079                 </fields>
8080                 <links>
8081             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8082                 </links>
8083                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8084                         <actions>
8085                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8086                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8087                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8088                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8089                         </actions>
8090                 </permacrud>
8091         </class>
8092
8093         <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">
8094                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8095                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8096                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8097                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8098                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8099                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8100                 </fields>
8101                 <links>
8102                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8103                 </links>
8104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8105                         <actions>
8106                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8107                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8108                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8109                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8110                         </actions>
8111                 </permacrud>
8112         </class>
8113
8114         <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">
8115                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8116                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8117                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8118                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8119                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8120                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8121                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8122                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8123                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8124                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8125                 </fields>
8126                 <links>
8127                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8128                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8129             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8130             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8131                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8132                 </links>
8133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8134             <actions>
8135                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8136                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8137                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8138                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8139             </actions>
8140         </permacrud>
8141         </class>
8142
8143         <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">
8144                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8145                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8146                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8147                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8148                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8149                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8150                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8151                 </fields>
8152                 <links>
8153                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8154                 </links>
8155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8156                         <actions>
8157                                 <create permission="ADMIN_FUNDING_SOURCE">
8158                     <context link="funding_source" field="owner"/>
8159                 </create>
8160                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8161                     <context link="funding_source" field="owner"/>
8162                 </retrieve>
8163                                 <update permission="ADMIN_FUNDING_SOURCE">
8164                     <context link="funding_source" field="owner"/>
8165                 </update>
8166                                 <delete permission="ADMIN_FUNDING_SOURCE">
8167                     <context link="funding_source" field="owner"/>
8168                 </delete>
8169                         </actions>
8170                 </permacrud>
8171         </class>
8172
8173         <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">
8174                 <fields oils_persist:primary="id">
8175                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8176                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8177                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8178                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8179                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8180                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8181                 </fields>
8182                 <links>
8183                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8184                 </links>
8185         </class>
8186
8187         <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">
8188                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8189                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8190                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8191                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8192                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8193                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8194                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8195                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8196                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8197                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8198                 </fields>
8199                 <links>
8200                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8201                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8202                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8203                 </links>
8204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8205                         <actions>
8206                                 <create permission="ADMIN_ACQ_FUND">
8207                     <context link="fund" field="org"/>
8208                 </create>
8209                                 <retrieve permission="ADMIN_ACQ_FUND">
8210                     <context link="fund" field="org"/>
8211                 </retrieve>
8212                                 <update permission="ADMIN_ACQ_FUND">
8213                     <context link="fund" field="org"/>
8214                 </update>
8215                                 <delete permission="ADMIN_ACQ_FUND">
8216                     <context link="fund" field="org"/>
8217                 </delete>
8218                         </actions>
8219                 </permacrud>
8220         </class>
8221
8222         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8223                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8224                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8225                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8226                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8227                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8228                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8229                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8230                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8231                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8232                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8233                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8234                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8235                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8236                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8237                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8238                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8239                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8240                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8241                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8242                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8243                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8244                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8245                 </fields>
8246                 <links>
8247                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8248                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8249             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8250             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8251             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8252             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8253             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8254             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8255             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8256             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8257             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8258                 </links>
8259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8260             <actions>
8261                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8262                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8263                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8264                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8265             </actions>
8266         </permacrud>
8267         </class>
8268
8269         <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">
8270                 <fields oils_persist:primary="fund">
8271                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8272                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8273                 </fields>
8274                 <links>
8275                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8276                 </links>
8277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8278             <actions>
8279                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8280                                         <context link="fund" field="org" />
8281                 </retrieve>
8282             </actions>
8283         </permacrud>
8284         </class>
8285
8286         <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">
8287                 <fields oils_persist:primary="fund">
8288                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8289                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8290                 </fields>
8291                 <links>
8292                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8293                 </links>
8294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8295             <actions>
8296                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8297                                         <context link="fund" field="org" />
8298                 </retrieve>
8299             </actions>
8300         </permacrud>
8301         </class>
8302
8303         <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">
8304                 <fields oils_persist:primary="fund">
8305                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8306                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8307                 </fields>
8308                 <links>
8309                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8310                 </links>
8311         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8312             <actions>
8313                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8314                                         <context link="fund" field="org" />
8315                 </retrieve>
8316             </actions>
8317         </permacrud>
8318         </class>
8319
8320         <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">
8321                 <fields oils_persist:primary="fund">
8322                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8323                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8324                 </fields>
8325                 <links>
8326                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8327                 </links>
8328         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8329             <actions>
8330                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8331                                         <context link="fund" field="org" />
8332                 </retrieve>
8333             </actions>
8334         </permacrud>
8335         </class>
8336
8337         <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">
8338                 <fields oils_persist:primary="fund">
8339                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8340                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8341                 </fields>
8342                 <links>
8343                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8344                 </links>
8345         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8346             <actions>
8347                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8348                                         <context link="fund" field="org" />
8349                 </retrieve>
8350             </actions>
8351         </permacrud>
8352         </class>
8353
8354    <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">
8355         <fields oils_persist:primary="fund">
8356             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8357             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8358         </fields>
8359         <links>
8360             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8361         </links>
8362     </class>
8363
8364    <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">
8365         <fields oils_persist:primary="fund">
8366             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8367             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8368         </fields>
8369         <links>
8370             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8371         </links>
8372     </class>
8373
8374    <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">
8375         <fields oils_persist:primary="fund">
8376             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8377             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8378         </fields>
8379         <links>
8380             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8381         </links>
8382     </class>
8383
8384    <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">
8385         <fields oils_persist:primary="fund">
8386             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8387             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8388         </fields>
8389         <links>
8390             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8391         </links>
8392     </class>
8393
8394    <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">
8395         <fields oils_persist:primary="fund">
8396             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8397             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8398         </fields>
8399         <links>
8400             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8401         </links>
8402     </class>
8403
8404         <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">
8405                 <fields oils_persist:primary="funding_source">
8406                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8407                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8408                 </fields>
8409                 <links>
8410                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8411                 </links>
8412         </class>
8413
8414         <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">
8415                 <fields oils_persist:primary="funding_source">
8416                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8417                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8418                 </fields>
8419                 <links>
8420                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8421                 </links>
8422         </class>
8423
8424         <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">
8425                 <fields oils_persist:primary="funding_source">
8426                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8427                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8428                 </fields>
8429                 <links>
8430                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8431                 </links>
8432         </class>
8433
8434         <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">
8435                 <fields oils_persist:primary="fund">
8436                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8437                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8438                 </fields>
8439                 <links>
8440                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8441                 </links>
8442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8443             <actions>
8444                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8445                                         <context link="fund" field="org" />
8446                 </retrieve>
8447             </actions>
8448         </permacrud>
8449     </class>
8450     <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">
8451         <oils_persist:source_definition><![CDATA[
8452             SELECT
8453                 acqf.*,
8454                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8455                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8456                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8457                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8458             FROM
8459                 acq.fund acqf
8460                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8461                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8462                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8463                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8464         ]]></oils_persist:source_definition>
8465         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8466             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8467             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8468             <field reporter:label="Name" name="name" reporter:datatype="text" />
8469             <field reporter:label="Year" name="year" reporter:datatype="int" />
8470             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8471             <field reporter:label="Code" name="code" reporter:datatype="text" />
8472             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8473             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8474             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8475             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8476             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8477
8478             <!-- non fund-native fields -->
8479             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8480             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8481             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8482             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8483         </fields>
8484         <links>
8485             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8486             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8487             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8488         </links>
8489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8490             <actions>
8491                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8492             </actions>
8493         </permacrud>
8494         </class>
8495         <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">
8496                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8497                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8498                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8499                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8500                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8501                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8502                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8503                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8504                 </fields>
8505                 <links>
8506                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8507                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8508                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8509                 </links>
8510                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8511                         <actions>
8512                                 <create permission="ADMIN_ACQ_FUND">
8513                     <context link="fund" field="org"/>
8514                 </create>
8515                                 <retrieve permission="ADMIN_ACQ_FUND">
8516                     <context link="fund" field="org"/>
8517                 </retrieve>
8518                                 <update permission="ADMIN_ACQ_FUND">
8519                     <context link="fund" field="org"/>
8520                 </update>
8521                                 <delete permission="ADMIN_ACQ_FUND">
8522                     <context link="fund" field="org"/>
8523                 </delete>
8524                         </actions>
8525                 </permacrud>
8526         </class>
8527
8528     <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">
8529         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8530             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8531             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8532             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8533             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8534             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8535             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8536             <field reporter:label="Note" name="note" reporter:datatype="text" />
8537             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8538         </fields>
8539         <links>
8540             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8541             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8542             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8543         </links>
8544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8545                         <actions>
8546                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8547                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8548                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8549                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8550                         </actions>
8551                 </permacrud>
8552     </class>
8553
8554         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8555                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8556                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8557                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8558                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8559                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8560                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8561                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8562                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8563                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8564                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8565                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8566                 </fields>
8567                 <links>
8568                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8569                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8570                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8571                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8572                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8573                 </links>
8574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8575                         <actions>
8576                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8577                         </actions>
8578                 </permacrud>
8579         </class>
8580
8581         <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">
8582                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8583                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8584                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8585                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8586                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8587                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8588                 </fields>
8589                 <links>
8590                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8591                 </links>
8592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8593                         <actions>
8594                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8595                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8596                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8597                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8598                         </actions>
8599                 </permacrud>
8600         </class>
8601
8602         <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">
8603                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8604                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8605                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8606                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8607                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8608                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8609                         <field reporter:label="State" name="state" reporter:datatype="text" />
8610                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8611                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8612                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8613                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8614                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8615                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8616                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8617                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8618                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8619                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8620                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8621                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8622                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8623                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8624                 </fields>
8625                 <links>
8626                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8627                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8628                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8629                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8630                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8631                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8632                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8633                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8634                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8635                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8636                 </links>
8637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8638                         <actions>
8639                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8640                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8641                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8642                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8643                         </actions>
8644                 </permacrud>
8645         </class>
8646
8647         <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">
8648                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8649                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8650                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8651                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8652                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8653                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8654                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8655                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8656                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8657                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8658                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8659                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8660                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8661                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8662                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8663                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8664                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8665                 </fields>
8666                 <links>
8667                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8668                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8669                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8670                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8671                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8672                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8673                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8674                 </links>
8675                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8676             <actions>
8677                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8678             </actions>
8679                 </permacrud>
8680         </class>
8681
8682         <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">
8683                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8684                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8685                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8686                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8687                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8688                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8689                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8690                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8691                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8692                 </fields>
8693                 <links>
8694                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8695                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8696                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8697                 </links>
8698                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8699             <actions>
8700                 <create permission="CREATE_PURCHASE_ORDER">
8701                     <context link="purchase_order" field="ordering_agency"/>
8702                 </create>
8703                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8704                     <context link="purchase_order" field="ordering_agency"/>
8705                 </retrieve>
8706                 <update permission="CREATE_PURCHASE_ORDER">
8707                     <context link="purchase_order" field="ordering_agency"/>
8708                 </update>
8709                 <delete permission="CREATE_PURCHASE_ORDER">
8710                     <context link="purchase_order" field="ordering_agency"/>
8711                 </delete>
8712             </actions>
8713                 </permacrud>
8714         </class>
8715
8716         <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">
8717                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8718                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8719                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8720                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8721                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8722                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8723                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8724                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8725                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8726                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8727                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8728                 </fields>
8729                 <links>
8730                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8731                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8732                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8733                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8734                 </links>
8735                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8736             <actions>
8737                 <create permission="CREATE_PURCHASE_ORDER">
8738                     <context link="purchase_order" field="ordering_agency"/>
8739                 </create>
8740                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8741                     <context link="purchase_order" field="ordering_agency"/>
8742                 </retrieve>
8743                 <update permission="CREATE_PURCHASE_ORDER">
8744                     <context link="purchase_order" field="ordering_agency"/>
8745                 </update>
8746                 <delete permission="CREATE_PURCHASE_ORDER">
8747                     <context link="purchase_order" field="ordering_agency"/>
8748                 </delete>
8749             </actions>
8750                 </permacrud>
8751         </class>
8752
8753         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8754                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8755                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8756                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8757                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8758                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8759                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8760                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8761                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8762                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8763                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8764                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8765                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8766                         <field reporter:label="State" name="state" reporter:datatype="text" />
8767                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8768                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8769                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8770                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8771                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8772                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8773                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8774                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8775                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8776                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8777                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8778                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8779                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8780                 </fields>
8781                 <links>
8782                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8783                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8784                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8785                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8786                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8787                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8788                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8789                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8790                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8791                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8792                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8793                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8794                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8795                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8796                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8797                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8798                 </links>
8799                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8800                         <actions>
8801                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8802                                         <context link="purchase_order" field="ordering_agency"/>
8803                                         <context link="picklist" field="org_unit"/>
8804                                 </retrieve>
8805                         </actions>
8806                 </permacrud>
8807         </class>
8808
8809         <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">
8810                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8811                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8812                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8813                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8814                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8815                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8816                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8817                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8818                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8819                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8820                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8821                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8822                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8823                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8824                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8825                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8826                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8827                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8828                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8829                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8830                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8831                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8832                 </fields>
8833                 <links>
8834                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8835                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8836                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8837                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8838                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8839                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8840                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8841                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8842                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8843                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8844                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8845                 </links>
8846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8847                         <actions>
8848                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8849                                         <context link="purchase_order" field="ordering_agency"/>
8850                                         <context link="picklist" field="org_unit"/>
8851                                 </retrieve>
8852                         </actions>
8853                 </permacrud>
8854         </class>
8855
8856         <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">
8857                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8858                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8859                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8860                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8861                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8862                 </fields>
8863                 <links>
8864                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8865                 </links>
8866                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8867                         <actions>
8868                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8869                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8870                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8871                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8872                         </actions>
8873                 </permacrud>
8874         </class>
8875
8876         <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">
8877                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8878                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8879                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8880                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8881                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8882                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8883                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8884                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8885                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8886                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8887                 </fields>
8888                 <links>
8889                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8890                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8891                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8892                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8893                 </links>
8894         </class>
8895
8896         <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">
8897                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8898                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8899                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8900                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8901                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8902                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8903                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8904                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8905                 </fields>
8906                 <links>
8907                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8908                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8909                 </links>
8910         </class>
8911
8912         <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">
8913                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8914                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8915                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8916                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8917                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8918                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8919                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8920                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8921                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8922                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8923                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8924                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8925                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8926                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8927                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8928                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8929                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8930                 </fields>
8931                 <links>
8932                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8933                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8934                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8935                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8936                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8937                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8938                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8939                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8940                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8941                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8942                 </links>
8943         </class>
8944
8945         <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">
8946                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8947                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8948                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8949                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8950                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8951                 </fields>
8952                 <links/>
8953                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8954                         <actions>
8955                                 <retrieve />
8956                         </actions>
8957                 </permacrud>
8958         </class>
8959
8960         <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">
8961                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8962                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8963                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8964                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8965                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8966                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8967             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8968                 </fields>
8969                 <links/>
8970         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8971             <actions>
8972                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8973                 <retrieve />
8974                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8975                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8976             </actions>
8977         </permacrud>
8978         </class>
8979
8980         <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">
8981                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8982                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8983                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8984                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8985                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8986                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8987                 </fields>
8988                 <links/>
8989         </class>
8990         <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">
8991                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8992                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8993                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8994                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8995                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8996                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8997                 </fields>
8998                 <links>
8999                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9000                 </links>
9001         </class>
9002
9003         <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">
9004             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9005                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9006                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9007                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9008                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9009                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9010                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9011         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9012
9013             </fields>
9014             <links>
9015                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9016             </links>
9017             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9018                 <actions>
9019                     <create permission="ADMIN_PROVIDER">
9020                         <context link="provider" field="owner"/>
9021                     </create>
9022                     <retrieve permission="ADMIN_PROVIDER">
9023                         <context link="provider" field="owner"/>
9024                     </retrieve>
9025                     <update permission="ADMIN_PROVIDER">
9026                         <context link="provider" field="owner"/>
9027                     </update>
9028                     <delete permission="ADMIN_PROVIDER">
9029                         <context link="provider" field="owner"/>
9030                     </delete>
9031                 </actions>
9032             </permacrud>
9033         </class>
9034         
9035         <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">
9036             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9037                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9038                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9039                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9040                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9041             </fields>
9042             <links>
9043                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9044             </links>
9045             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9046                 <actions>
9047                     <create permission="ADMIN_PROVIDER">
9048                         <context link="provider" field="owner"/>
9049                     </create>
9050                     <retrieve permission="ADMIN_PROVIDER">
9051                         <context link="provider" field="owner"/>
9052                     </retrieve>
9053                     <update permission="ADMIN_PROVIDER">
9054                         <context link="provider" field="owner"/>
9055                     </update>
9056                     <delete permission="ADMIN_PROVIDER">
9057                         <context link="provider" field="owner"/>
9058                     </delete>
9059                 </actions>
9060             </permacrud>
9061         </class>
9062         
9063         <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">
9064             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9065                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9066                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9067                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9068                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9069                 </fields>
9070                 <links/>
9071         </class>
9072
9073         <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">
9074                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9075                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9076                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9077                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9078                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9079                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9080                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9081                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9082                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9083                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9084                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9085                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9086                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9087                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9088                 </fields>
9089                 <links>
9090                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9091                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9092                 </links>
9093         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9094             <actions>
9095                 <create permission="ADMIN_PROVIDER">
9096                     <context link="provider" field="owner"/>
9097                 </create>
9098                 <retrieve permission="ADMIN_PROVIDER">
9099                     <context link="provider" field="owner"/>
9100                 </retrieve>
9101                 <update permission="ADMIN_PROVIDER">
9102                     <context link="provider" field="owner"/>
9103                 </update>
9104                 <delete permission="ADMIN_PROVIDER">
9105                     <context link="provider" field="owner"/>
9106                 </delete>
9107             </actions>
9108         </permacrud>
9109         </class>
9110
9111         <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">
9112                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9113                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9114                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9115                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9116                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9117                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9118                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9119                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9120                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9121                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9122                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9123                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9124                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9125                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9126                 </fields>
9127                 <links>
9128                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9129                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9130                 </links>
9131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9132             <actions>
9133                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9134                     <context link="account" jump="provider" field="owner"/>
9135                 </retrieve>
9136                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9137                     <context link="account" jump="provider" field="owner"/>
9138                 </update>
9139                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9140                     <context link="account" jump="provider" field="owner"/>
9141                 </delete>
9142             </actions>
9143         </permacrud>
9144         </class>
9145
9146
9147         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9148                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9149                         <field name="id" reporter:datatype="id" />
9150                         <field name="parent" reporter:datatype="link"/>
9151                         <field name="owner" reporter:datatype="link"/>
9152                         <field name="create_time" reporter:datatype="timestamp"/>
9153                         <field name="name" reporter:datatype="text"/>
9154                         <field name="shared" reporter:datatype="bool"/>
9155                         <field name="share_with" reporter:datatype="link"/>
9156                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9157                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9158                 </fields>
9159                 <links>
9160                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9161                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9162                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9163                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9164                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9165                 </links>
9166         </class>
9167         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9168                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9169                         <field name="id" reporter:datatype="id" />
9170                         <field name="parent" reporter:datatype="link"/>
9171                         <field name="owner" reporter:datatype="link"/>
9172                         <field name="create_time" reporter:datatype="timestamp"/>
9173                         <field name="name" reporter:datatype="text"/>
9174                         <field name="shared" reporter:datatype="bool"/>
9175                         <field name="share_with" reporter:datatype="link"/>
9176                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9177                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9178                 </fields>
9179                 <links>
9180                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9181                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9182                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9183                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9184                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9185                 </links>
9186         </class>
9187         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9188                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9189                         <field name="id" reporter:datatype="id" />
9190                         <field name="parent" reporter:datatype="link"/>
9191                         <field name="owner" reporter:datatype="link"/>
9192                         <field name="create_time" reporter:datatype="timestamp"/>
9193                         <field name="name" reporter:datatype="text"/>
9194                         <field name="shared" reporter:datatype="bool"/>
9195                         <field name="share_with" reporter:datatype="link"/>
9196                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9197                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9198                 </fields>
9199                 <links>
9200                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9201                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9202                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9203                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9204                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9205                 </links>
9206         </class>
9207         <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">
9208                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9209                         <field name="id" reporter:datatype="id" />
9210                         <field name="owner" reporter:datatype="link"/>
9211                         <field name="create_time" reporter:datatype="timestamp"/>
9212                         <field name="name" reporter:datatype="text"/>
9213                         <field name="data" reporter:datatype="text"/>
9214                         <field name="folder" reporter:datatype="link"/>
9215                         <field name="description" reporter:datatype="text"/>
9216                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9217                 </fields>
9218                 <links>
9219                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9220                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9221                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9222                 </links>
9223         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9224             <actions>
9225                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9226                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9227                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9228                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9229             </actions>
9230         </permacrud>
9231         </class>
9232         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9233                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9234                         <field name="id" reporter:datatype="id" />
9235                         <field name="owner" reporter:datatype="link"/>
9236                         <field name="create_time" reporter:datatype="timestamp"/>
9237                         <field name="template" reporter:datatype="link"/>
9238                         <field name="data" reporter:datatype="text"/>
9239                         <field name="folder" reporter:datatype="link"/>
9240                         <field name="recur" reporter:datatype="bool"/>
9241                         <field name="recurrence" reporter:datatype="interval"/>
9242                         <field name="name" reporter:datatype="text"/>
9243                         <field name="description" reporter:datatype="text"/>
9244                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9245                 </fields>
9246                 <links>
9247                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9248                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9249                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9250                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9251                 </links>
9252         </class>
9253         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9254                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9255                         <field name="id" reporter:datatype="id" />
9256                         <field name="runner" reporter:datatype="link"/>
9257                         <field name="start_time" reporter:datatype="timestamp"/>
9258                         <field name="complete_time" reporter:datatype="timestamp"/>
9259                         <field name="run_time" reporter:datatype="timestamp"/>
9260                         <field name="email" reporter:datatype="text"/>
9261                         <field name="excel_format" reporter:datatype="bool"/>
9262                         <field name="csv_format" reporter:datatype="bool"/>
9263                         <field name="html_format" reporter:datatype="bool"/>
9264                         <field name="error_code" reporter:datatype="int"/>
9265                         <field name="error_text" reporter:datatype="text"/>
9266                         <field name="report" reporter:datatype="link"/>
9267                         <field name="folder" reporter:datatype="link"/>
9268                         <field name="chart_pie" reporter:datatype="bool"/>
9269                         <field name="chart_bar" reporter:datatype="bool"/>
9270                         <field name="chart_line" reporter:datatype="bool"/>
9271                 </fields>
9272                 <links>
9273                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9274                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9275                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9276                 </links>
9277         </class>
9278         <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">
9279                 <fields oils_persist:primary="id">
9280                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9281                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9282                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9283                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9284                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9285                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9286                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9287                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9288                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9289                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9290                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9291                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9292                 </fields>
9293                 <links>
9294                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9295                 </links>
9296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9297                         <actions>
9298                                 <retrieve />
9299                         </actions>
9300                 </permacrud>
9301         </class>
9302         <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">
9303                 <fields oils_persist:primary="id">
9304                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9305                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9306                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9307                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9308                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9309                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9310                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9311                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9312                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9313                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9314                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9315                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9316                 </fields>
9317                 <links>
9318                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9319                 </links>
9320         </class>
9321         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9322                 <fields oils_persist:primary="id">
9323                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9324                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9325                         <field reporter:label="Fingerprint" name="fingerprint" />
9326                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9327                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9328                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9329                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9330                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9331                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9332                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9333                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9334                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9335                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9336                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9337                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9338                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9339                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9340                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9341                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9342                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9343                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9344                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9345                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9346                 </fields>
9347                 <links>
9348                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9349                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9350                 </links>
9351         </class>
9352         <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">
9353                 <fields oils_persist:primary="id">
9354                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9355                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9356                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9357                 </fields>
9358                 <links>
9359                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9360                 </links>
9361         </class>
9362         <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">
9363                 <fields oils_persist:primary="id">
9364                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9365                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9366                 </fields>
9367                 <links>
9368                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9369                 </links>
9370         </class>
9371         <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">
9372                 <fields oils_persist:primary="id">
9373                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9374                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9375                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9376                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9377                 </fields>
9378                 <links>
9379                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9380                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9381                 </links>
9382         </class>
9383         <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">
9384                 <fields oils_persist:primary="xact">
9385                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9386                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9387                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9388                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9389                 </fields>
9390                 <links>
9391                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9392                 </links>
9393         </class>
9394         <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">
9395                 <fields oils_persist:primary="xact">
9396                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9397                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9398                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9399                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9400                 </fields>
9401                 <links>
9402                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9403                 </links>
9404         </class>
9405         <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)">
9406                 <fields oils_persist:primary="id">
9407                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9408                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9409                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9410                 </fields>
9411                 <links>
9412                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9413                 </links>
9414         </class>
9415         <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">
9416                 <fields oils_persist:primary="id">
9417                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9418                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9419                 </fields>
9420                 <links>
9421                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9422                 </links>
9423         </class>
9424         <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">
9425                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9426                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9427                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9428                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9429                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9430                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9431                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9432                 </fields>
9433                 <links>
9434                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9435                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9436                 </links>
9437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9438                         <actions>
9439                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9440                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9441                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9442                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9443                         </actions>
9444                 </permacrud>
9445         </class>
9446         <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">
9447                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9448                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9449                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9450                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9451                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9452                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9453                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9454                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9455                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9456                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9457                 </fields>
9458                 <links>
9459                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9460                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9461                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9462                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9463                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9464                 </links>
9465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9466                         <actions>
9467                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9468                                         <context link="formula" field="owner"/>
9469                                 </create>
9470                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9471                                         <context link="formula" field="owner"/>
9472                                 </retrieve>
9473                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9474                                         <context link="formula" field="owner"/>
9475                                 </update>
9476                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9477                                         <context link="formula" field="owner"/>
9478                                 </delete>
9479                         </actions>
9480                 </permacrud>
9481         </class>
9482
9483         <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">
9484                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9485                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9486                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9487                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9488                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9489                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9490                 </fields>
9491                 <links>
9492                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9493                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9494                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9495                 </links>
9496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9497                         <actions>
9498                                 <create permission="CREATE_PURCHASE_ORDER">
9499                                         <context link="formula" field="owner"/>
9500                 </create>
9501                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9502                                         <context link="formula" field="owner"/>
9503                 </retrieve>
9504                                 <update permission="CREATE_PURCHASE_ORDER">
9505                                         <context link="formula" field="owner"/>
9506                 </update>
9507                                 <delete permission="CREATE_PURCHASE_ORDER">
9508                                         <context link="formula" field="owner"/>
9509                 </delete>
9510                         </actions>
9511                 </permacrud>
9512         </class>
9513
9514         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9515                 <fields oils_persist:primary="id">
9516                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9517                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9518                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9519                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9520                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9521                 </fields>
9522                 <links>
9523                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9524                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9525                 </links>
9526         </class>
9527
9528         <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">
9529                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9530                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9531                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9532                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9533                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9534                 </fields>
9535                 <links>
9536                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9537                 </links>
9538                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9539                         <actions>
9540                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9541                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9542                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9543                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9544                         </actions>
9545                 </permacrud>
9546         </class>
9547
9548         <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">
9549                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9550                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9551                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9552                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9553                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9554                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9555                 </fields>
9556                 <links>
9557                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9558                 </links>
9559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9560                         <actions>
9561                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9562                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9563                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9564                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9565                         </actions>
9566                 </permacrud>
9567         </class>
9568
9569         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9570                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9571                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9572                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9573                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9574                 </fields>
9575                 <links>
9576                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9577                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9578                 </links>
9579         </class>
9580
9581         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9582                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9583                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9584                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9585                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9586                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9587                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9588                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9589                 </fields>
9590                 <links>
9591                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9592                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9593                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9594                 </links>
9595         </class>
9596
9597         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9598                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9599                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9600                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9601                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9602                 </fields>
9603                 <links>
9604                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9605                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9606                 </links>
9607         </class>
9608
9609         <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">
9610                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9611                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9612                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9613                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9614                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9615                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9616                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9617                 </fields>
9618                 <links>
9619                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9620                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9621                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9622                 </links>
9623         </class>
9624
9625         <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">
9626                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9627                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9628                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9629                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9630                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9631                 </fields>
9632                 <links>
9633                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9634                 </links>
9635                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9636             <actions>
9637                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9638                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9639                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9640                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9641             </actions>
9642                 </permacrud>
9643         </class>
9644
9645         <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">
9646                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9647                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9648                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9649                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9650                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9651                 </fields>
9652                 <links>
9653                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9654                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9655                 </links>
9656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9657                         <actions>
9658                                 <create permission="ADMIN_CLAIM_POLICY">
9659                                         <context link="claim_policy" field="org_unit"/>
9660                 </create>
9661                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9662                                         <context link="claim_policy" field="org_unit"/>
9663                 </retrieve>
9664                                 <update permission="ADMIN_CLAIM_POLICY">
9665                                         <context link="claim_policy" field="org_unit"/>
9666                 </update>
9667                                 <delete permission="ADMIN_CLAIM_POLICY">
9668                                         <context link="claim_policy" field="org_unit"/>
9669                 </delete>
9670                         </actions>
9671                 </permacrud>
9672         </class>
9673
9674     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9675         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9676             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9677             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9678             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9679             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9680             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9681             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9682             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9683             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9684             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9685             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9686             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9687             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9688             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9689             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9690             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9691             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9692         </fields>
9693         <links>
9694             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9695         </links>
9696     </class>
9697
9698     <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">
9699         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9700             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9701             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9702             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9703             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9704             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9705         </fields>
9706     </class>
9707
9708     <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">
9709         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9710             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9711             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9712             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9713             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9714             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9715             <field reporter:label="City" name="city" reporter:datatype="text"/>
9716             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9717             <field reporter:label="State" name="state" reporter:datatype="text"/>
9718             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9719             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9720             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9721         </fields>
9722     </class>
9723
9724     <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">
9725         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9726             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9727             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9728             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9729             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9730             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9731             <field reporter:label="City" name="city" reporter:datatype="text"/>
9732             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9733             <field reporter:label="State" name="state" reporter:datatype="text"/>
9734             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9735             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9736             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9737         </fields>
9738     </class>
9739
9740     <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">
9741         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9742             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9743             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9744             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9745             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9746             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9747             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9748         </fields>
9749     </class>
9750
9751     <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">
9752         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
9753             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9754             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9755             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9756             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
9757             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
9758             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9759         </fields>
9760     </class>
9761
9762         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9763                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9764                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9765                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9766                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9767                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9768                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9769                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9770                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9771                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9772                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9773                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9774                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9775                 </fields>
9776                 <links>
9777                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9778                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9779                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9780                 </links>
9781         </class>
9782
9783         <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
9784                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9785                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9786                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9787                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9788                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9789                 </fields>
9790                 <links>
9791                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9792                 </links>
9793         </class>
9794
9795     <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">
9796         <fields>
9797             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9798             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9799             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9800         </fields>
9801                 <links>
9802                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9803                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9804                 </links>
9805     </class>
9806
9807     <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">
9808         <fields>
9809             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9810             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9811         </fields>
9812                 <links>
9813                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9814                 </links>
9815     </class>
9816
9817     <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">
9818         <fields>
9819             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9820             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9821             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9822         </fields>
9823                 <links>
9824                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9825                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9826                 </links>
9827     </class>
9828
9829     <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">
9830         <fields>
9831             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9832             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9833         </fields>
9834                 <links>
9835                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9836                 </links>
9837     </class>
9838
9839     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9840                 <oils_persist:source_definition>
9841
9842             SELECT  DISTINCT l.*
9843               FROM  action.unfulfilled_hold_loops l
9844                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9845               WHERE l.count = m.max
9846
9847                 </oils_persist:source_definition>
9848         <fields>
9849             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9850             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9851             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9852         </fields>
9853                 <links>
9854                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9855                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9856                 </links>
9857     </class>
9858
9859         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9860                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9861                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9862                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9863                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9864                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9865                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9866                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9867                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9868                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9869                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9870                 </fields>
9871                 <links>
9872                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9873                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9874                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9875                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9876                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9877                 </links>
9878         </class>
9879
9880         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9881                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9882                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9883                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9884                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9885                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9886                 </fields>
9887                 <links>
9888                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9889                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9890                 </links>
9891         </class>
9892
9893         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9894                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9895                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9896                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9897                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9898                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9899                 </fields>
9900                 <links>
9901                 </links>
9902         </class>
9903
9904         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9905                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9906                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9907                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9908                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9909                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9910                 </fields>
9911                 <links>
9912                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9913                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9914                 </links>
9915         </class>
9916         
9917         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9918                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9919                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9920                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9921                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9922                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9923                 </fields>
9924                 <links>
9925                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9926                 </links>
9927         </class>
9928         
9929         <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">
9930                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9931                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9932                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9933                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9934                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9935                 </fields>
9936                 <links>
9937                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9938                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9939                 </links>
9940         </class>
9941
9942         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9943                 <fields oils_persist:primary="name">
9944                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9945                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9946                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9947                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9948                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9949                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9950                 </fields>
9951                 <links>
9952                 </links>
9953         </class>
9954
9955         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9956                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9957                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9958                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9959                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9960                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9961                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9962                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9963                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9964                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9965                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9966                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9967                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9968                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9969                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9970                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9971                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9972                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9973                 </fields>
9974                 <links>
9975                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9976                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9977                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9978                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9979                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9980                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9981                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9982                 </links>
9983         </class>
9984
9985         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9986                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9987                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9988                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9989                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9990                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9991                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9992                 </fields>
9993                 <links>
9994                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9995                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9996                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9997                 </links>
9998         </class>
9999
10000         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10001                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10002                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10003                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10004                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10005                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10006                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10007                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10008                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10009                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10010                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10011                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10012                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10013                 </fields>
10014                 <links>
10015                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10016                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10017                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10018                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10019                 </links>
10020         </class>
10021
10022         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10023                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10024                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10025                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10026                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10027                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10028                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10029                 </fields>
10030                 <links>
10031                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10032                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10033                 </links>
10034         </class>
10035
10036         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10037                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10038                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10039                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10040                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10041                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10042                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10043                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10044                 </fields>
10045                 <links>
10046                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10047                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10048                 </links>
10049         </class>
10050
10051         <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">
10052                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10053                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10054                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10055                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10056                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10057                 </fields>
10058                 <links>
10059                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10060                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10061                 </links>
10062         </class>
10063
10064         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10065                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10066                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10067                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10068                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10069                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10070                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10071                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10072                 </fields>
10073                 <links>
10074                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10075                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10076                 </links>
10077         </class>
10078
10079         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
10080                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10081                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10082                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10083                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10084                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10085                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10086                 </fields>
10087                 <links>
10088                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10089                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10090                 </links>
10091         </class>
10092
10093         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10094                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10095                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10096                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10097                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10098                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10099                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10100                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10101                 </fields>
10102                 <links>
10103                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10104                 </links>
10105         </class>
10106
10107         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10108                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10109                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10110                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10111                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10112                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10113                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10114                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10115                 </fields>
10116                 <links>
10117                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10118                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10119                 </links>
10120         </class>
10121
10122         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10123                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10124                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10125                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10126                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10127                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10128                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10129                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10130                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10131                 </fields>
10132                 <links>
10133                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10134                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10135                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10136                 </links>
10137         </class>
10138
10139         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10140                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10141                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10142                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10143                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10144                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10145                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10146                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10147                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10148                 </fields>
10149                 <links>
10150                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10151                 </links>
10152         </class>
10153
10154         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10155                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10156                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10157                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10158                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10159                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10160                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10161                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10162                 </fields>
10163                 <links>
10164                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10165                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10166                 </links>
10167         </class>
10168
10169         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10170                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10171                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10172                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10173                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10174                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10175                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10176                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10177                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10178                 </fields>
10179                 <links>
10180                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10181                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10182                 </links>
10183         </class>
10184
10185         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10186                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10187                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10188                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10189                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10190                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10191                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10192                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10193                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10194                 </fields>
10195                 <links>
10196                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10197                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10198                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10199                 </links>
10200         </class>
10201
10202         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10203                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10204                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10205                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10206                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10207                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10208                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10209                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10210                 </fields>
10211                 <links>
10212                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10213                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10214                 </links>
10215         </class>
10216
10217         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10218                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10219                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10220                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10221                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10222                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10223                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10224                 </fields>
10225                 <links>
10226                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10227                 </links>
10228         </class>
10229
10230         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10231                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10232                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10233                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10234                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10235                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10236                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10237                 </fields>
10238                 <links>
10239                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10240                 </links>
10241         </class>
10242
10243         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10244                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10245                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10246                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10247                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10248                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10249                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10250                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10251                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10252                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10253                 </fields>
10254                 <links>
10255                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10256                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10257                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10258                 </links>
10259         </class>
10260
10261         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10262                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10263                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10264                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10265                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10266                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10267                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10268                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10269                 </fields>
10270                 <links>
10271                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10272                 </links>
10273         </class>
10274
10275         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10276                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10277                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10278                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10279                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10280                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10281                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10282                 </fields>
10283                 <links>
10284                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10285                 </links>
10286         </class>
10287
10288         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10289                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10290                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10291                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10292                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10293                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10294                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10295                 </fields>
10296                 <links>
10297                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10298                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10299                 </links>
10300         </class>
10301
10302         <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">
10303                 <fields oils_persist:primary="id">
10304                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10305                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10306                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10307                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10308                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10309                 </fields>
10310                 <links>
10311                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10312                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10313                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10314                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10315                 </links>
10316         </class>
10317
10318         <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">
10319                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10320                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10321                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10322                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10323                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10324                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10325                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10326                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10327                 </fields>
10328                 <links/>
10329                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10330                         <actions>
10331                                 <retrieve/>
10332                         </actions>
10333                 </permacrud>
10334         </class>
10335
10336         <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">
10337                 <fields oils_persist:primary="ptype_key">
10338                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10339                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10340                 </fields>
10341                 <links/>
10342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10343                         <actions>
10344                                 <retrieve/>
10345                         </actions>
10346                 </permacrud>
10347         </class>
10348
10349         <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">
10350                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10351                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10352                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10353                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10354                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10355                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10356                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10357                 </fields>
10358                 <links>
10359                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10360                 </links>
10361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10362                         <actions>
10363                                 <retrieve/>
10364                         </actions>
10365                 </permacrud>
10366         </class>
10367
10368         <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">
10369                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10370                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10371                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10372                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10373                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10374                 </fields>
10375                 <links>
10376                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10377                 </links>
10378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10379                         <actions>
10380                                 <retrieve/>
10381                         </actions>
10382                 </permacrud>
10383         </class>
10384
10385     <class
10386         id="uvs"
10387         controller="open-ils.cstore open-ils.pcrud"
10388         oils_obj:fieldmapper="url_verify::session"
10389         oils_persist:tablename="url_verify.session"
10390         reporter:label="URL Verification Session"
10391     >
10392         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10393             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10394             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10395                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10396             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10397             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10398             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10399             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10400             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10401             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10402         </fields>
10403
10404         <links>
10405             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10406             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10407             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10408             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10409             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10410         </links>
10411
10412         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10413             <actions>
10414                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10415             </actions>
10416         </permacrud>
10417
10418     </class>
10419
10420     <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">
10421         <oils_persist:source_definition>
10422             SELECT
10423                 cbrebi.id AS id,  -- so we can have a pkey in our view
10424                 uvs.id AS session,
10425                 uvs.owning_lib,
10426                 cbrebi.target_biblio_record_entry
10427             FROM url_verify.session uvs
10428             JOIN container.biblio_record_entry_bucket cbreb
10429                 ON (uvs.container = cbreb.id)
10430             JOIN container.biblio_record_entry_bucket_item cbrebi
10431                 ON (cbrebi.bucket = cbreb.id)
10432         </oils_persist:source_definition>
10433         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10434             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10435             <field reporter:label="Session" name="session" reporter:datatype="link" />
10436             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10437             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10438         </fields>
10439         <links>
10440             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10441             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10442             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10443         </links>
10444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10445             <actions>
10446                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10447             </actions>
10448         </permacrud>
10449     </class>
10450
10451     <class
10452         id="uvus"
10453         controller="open-ils.cstore open-ils.pcrud"
10454         oils_obj:fieldmapper="url_verify::url_selector"
10455         oils_persist:tablename="url_verify.url_selector"
10456         reporter:label="URL Verification URL Selector"
10457     >
10458         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10459             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10460             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10461                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10462             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10463         </fields>
10464
10465         <links>
10466             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10467             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10468         </links>
10469
10470         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10471             <actions>
10472                 <create permission="URL_VERIFY">
10473                     <context link="session" field="owning_lib"/>
10474                 </create>
10475                 <retrieve permission="URL_VERIFY">
10476                     <context link="session" field="owning_lib"/>
10477                 </retrieve>
10478                 <update permission="URL_VERIFY">
10479                     <context link="session" field="owning_lib"/>
10480                 </update>
10481                 <delete permission="URL_VERIFY">
10482                     <context link="session" field="owning_lib"/>
10483                 </delete>
10484             </actions>
10485         </permacrud>
10486
10487     </class>
10488
10489     <class
10490         id="uvu"
10491         controller="open-ils.cstore open-ils.pcrud"
10492         oils_obj:fieldmapper="url_verify::url"
10493         oils_persist:tablename="url_verify.url"
10494         reporter:label="URL Verification URL"
10495     >
10496         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10497             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10498                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10499                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10500                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10501                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10502             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10503             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10504             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10505             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10506             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10507             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10508             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10509             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10510             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10511             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10512             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10513             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10514             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10515         </fields>
10516
10517         <links>
10518             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10519             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10520             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10521             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10522             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10523         </links>
10524
10525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10526             <actions>
10527                 <create permission="URL_VERIFY">
10528                     <context link="session" field="owning_lib"/>
10529                 </create>
10530                 <retrieve permission="URL_VERIFY">
10531                     <context link="session" field="owning_lib"/>
10532                 </retrieve>
10533                 <update permission="URL_VERIFY">
10534                     <context link="session" field="owning_lib"/>
10535                 </update>
10536                 <delete permission="URL_VERIFY">
10537                     <context link="session" field="owning_lib"/>
10538                 </delete>
10539             </actions>
10540         </permacrud>
10541
10542     </class>
10543
10544     <class
10545         id="uvva"
10546         controller="open-ils.cstore open-ils.pcrud"
10547         oils_obj:fieldmapper="url_verify::verification_attempt"
10548         oils_persist:tablename="url_verify.verification_attempt"
10549         reporter:label="URL Verification Attempt"
10550     >
10551         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10552             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10553                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10554                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10555             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10556             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10557         </fields>
10558
10559         <links>
10560             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10561             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10562         </links>
10563
10564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10565             <actions>
10566                 <create permission="URL_VERIFY">
10567                     <context link="session" field="owning_lib"/>
10568                 </create>
10569                 <retrieve permission="URL_VERIFY">
10570                     <context link="session" field="owning_lib"/>
10571                 </retrieve>
10572                 <update permission="URL_VERIFY">
10573                     <context link="session" field="owning_lib"/>
10574                 </update>
10575                 <delete permission="URL_VERIFY">
10576                     <context link="session" field="owning_lib"/>
10577                 </delete>
10578             </actions>
10579         </permacrud>
10580
10581     </class>
10582
10583     <class
10584         id="uvuv"
10585         controller="open-ils.cstore open-ils.pcrud"
10586         oils_obj:fieldmapper="url_verify::url_verification"
10587         oils_persist:tablename="url_verify.url_verification"
10588         reporter:label="URL Verification"
10589     >
10590         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10591             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10592                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10593                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10594             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10595             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10596             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10597             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10598                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10599         </fields>
10600
10601         <links>
10602             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10603             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10604             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10605         </links>
10606
10607         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10608             <actions>
10609                 <create permission="URL_VERIFY">
10610                     <context link="attempt" jump="session" field="owning_lib"/>
10611                 </create>
10612                 <retrieve permission="URL_VERIFY">
10613                     <context link="attempt" jump="session" field="owning_lib"/>
10614                 </retrieve>
10615                 <update permission="URL_VERIFY">
10616                     <context link="attempt" jump="session" field="owning_lib"/>
10617                 </update>
10618                 <delete permission="URL_VERIFY">
10619                     <context link="attempt" jump="session" field="owning_lib"/>
10620                 </delete>
10621             </actions>
10622         </permacrud>
10623
10624     </class>
10625
10626         <class
10627                 id="cfdi"
10628                 controller="open-ils.cstore open-ils.pcrud"
10629                 oils_obj:fieldmapper="config::filter_dialog_interface"
10630                 oils_persist:tablename="config.filter_dialog_interface"
10631                 reporter:label="FilterDialog Interface">
10632                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10633                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10634                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10635                 </fields>
10636                 <links>
10637                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10638                 </links>
10639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10640                         <actions>
10641                                 <retrieve />
10642                         </actions>
10643                 </permacrud>
10644         </class>
10645
10646         <class
10647                 id="cfdfs"
10648                 controller="open-ils.cstore open-ils.pcrud"
10649                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10650                 oils_persist:tablename="config.filter_dialog_filter_set"
10651                 reporter:label="FilterDialog Filter Set">
10652                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10653                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10654                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10655                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10656                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10657                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10658                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10659                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10660                 </fields>
10661                 <links>
10662                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10663                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10664                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10665                 </links>
10666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10667                         <actions>
10668                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10669                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10670                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10671                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10672                         </actions>
10673                 </permacrud>
10674
10675         </class>
10676
10677         <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">
10678                 <fields oils_persist:primary="code">
10679                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10680                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10681                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10682                 </fields>
10683                 <links/>
10684                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10685                         <actions>
10686                                 <retrieve/>
10687                         </actions>
10688                 </permacrud>
10689         </class>
10690
10691         <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">
10692                 <oils_persist:source_definition>
10693
10694             SELECT  b.id,
10695                     MAX(dcp.edit_date) AS last_delete_date
10696              FROM   biblio.record_entry b
10697                     JOIN asset.call_number cn ON (cn.record = b.id)
10698                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10699              WHERE  NOT b.deleted
10700              GROUP BY b.id
10701              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10702
10703                 </oils_persist:source_definition>
10704                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10705                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10706                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10707                 </fields>
10708                 <links>
10709                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10710                 </links>
10711                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10712                         <actions>
10713                                 <retrieve/>
10714                         </actions>
10715                 </permacrud>
10716         </class>
10717
10718         <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">
10719                 <oils_persist:source_definition>
10720
10721             -- -- 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.
10722             -- -- 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
10723             -- -- may not.
10724             -- SELECT
10725             --     bre.id AS bib_id,
10726             --     COALESCE( z.copy_count, 0 ) AS copy_count,
10727             --     COALESCE( z.hold_count, 0 ) AS hold_count,
10728             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
10729             -- FROM (
10730                 SELECT
10731                     y.bre AS id,
10732                     COALESCE( x.copy_count, 0 ) AS copy_count,
10733                     y.hold_count AS hold_count,
10734                     (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
10735                 FROM (
10736                         SELECT
10737                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
10738                             COUNT(*) AS hold_count
10739                         FROM action.hold_request h
10740                         WHERE
10741                             cancel_time IS NULL
10742                             AND fulfillment_time IS NULL
10743                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10744                         GROUP BY 1
10745                     )y LEFT JOIN (
10746                         SELECT 
10747                             (SELECT id
10748                                 FROM biblio.record_entry 
10749                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10750                             ) AS bre, 
10751                             COUNT(*) AS copy_count
10752                         FROM asset.copy
10753                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10754                         WHERE copy.holdable 
10755                             AND NOT copy.deleted 
10756                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10757                         GROUP BY 1
10758                     )x ON x.bre = y.bre
10759                 -- )z RIGHT JOIN (
10760                 --     SELECT id
10761                 --     FROM biblio.record_entry
10762                 --     WHERE NOT deleted
10763                 -- )bre ON (z.bib_id = bre.id)
10764                 
10765
10766                 </oils_persist:source_definition>
10767                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10768                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10769                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10770                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10771                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10772                 </fields>
10773                 <links>
10774                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10775                 </links>
10776                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10777                         <actions>
10778                                 <retrieve/>
10779                         </actions>
10780                 </permacrud>
10781         </class>
10782
10783         <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">
10784                 <oils_persist:source_definition>
10785             SELECT *,
10786                 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,
10787                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10788             FROM
10789                 (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
10790                     FROM
10791                         action.hold_request ahr
10792                         JOIN reporter.hold_request_record rhrr USING (id)
10793                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10794                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10795                     WHERE
10796                         ahr.cancel_time IS NULL
10797                         AND ahr.fulfillment_time IS NULL
10798                     GROUP BY bib_record, pickup_lib
10799                 )x
10800                 JOIN
10801                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10802                     FROM
10803                         action.hold_request ahr
10804                         JOIN reporter.hold_request_record rhrr USING (id)
10805                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10806                     WHERE
10807                         ahr.cancel_time IS NULL
10808                         AND ahr.fulfillment_time IS NULL
10809                     GROUP BY bib_record
10810                 )y
10811                 USING (id)
10812                 </oils_persist:source_definition>
10813                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10814                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10815                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10816                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10817                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10818                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10819                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10820                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10821                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10822                 </fields>
10823                 <links>
10824                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10825                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10826                 </links>
10827                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10828                         <actions>
10829                                 <retrieve/>
10830                         </actions>
10831                 </permacrud>
10832         </class>
10833
10834         <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) ">
10835                 <oils_persist:source_definition>
10836             WITH counts_at_ou AS (
10837                 SELECT  rhrr.bib_record AS id,
10838                         aou.id AS pickup_lib_or_desc,
10839                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
10840                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
10841                   FROM  actor.org_unit aou
10842                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
10843                         action.hold_request ahr
10844                         JOIN reporter.hold_request_record rhrr USING (id)
10845                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10846                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
10847                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
10848                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
10849                         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
10850                   GROUP BY 1, 2
10851             )
10852             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
10853                    y.holds_everywhere, y.copy_count_everywhere,
10854                 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,
10855                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
10856             FROM counts_at_ou x
10857                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10858                     FROM
10859                         action.hold_request ahr
10860                         JOIN reporter.hold_request_record rhrr USING (id)
10861                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10862                     WHERE
10863                         ahr.cancel_time IS NULL
10864                         AND ahr.fulfillment_time IS NULL
10865                     GROUP BY bib_record
10866                 )y
10867                 USING (id)
10868                 </oils_persist:source_definition>
10869                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10870                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10871                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
10872                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
10873                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
10874                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10875                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10876                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
10877                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10878                 </fields>
10879                 <links>
10880                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10881                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
10882                 </links>
10883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10884                         <actions>
10885                                 <retrieve/>
10886                         </actions>
10887                 </permacrud>
10888         </class>
10889
10890         <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">
10891                 <oils_persist:source_definition>
10892             SELECT
10893                 ac.id,
10894                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10895                 MAX(actac.xact_start) AS last_circ
10896             FROM asset.copy ac
10897                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10898             GROUP BY ac.id
10899
10900             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10901             --SELECT
10902             --    ac.id,
10903             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10904             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10905             --FROM asset.copy ac
10906             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10907             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10908             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10909                 </oils_persist:source_definition>
10910                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10911                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10912                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10913                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10914                 </fields>
10915                 <links>
10916                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10917                 </links>
10918                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10919                         <actions>
10920                                 <retrieve/>
10921                         </actions>
10922                 </permacrud>
10923         </class>
10924
10925         <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">
10926                 <fields oils_persist:primary="id">
10927                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10928                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10929                 </fields>
10930                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10931                         <actions>
10932                                 <retrieve/>
10933                         </actions>
10934                 </permacrud>
10935         </class>
10936
10937         <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">
10938                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10939                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10940                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10941                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10942                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10943                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10944                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10945                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10946                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10947                 </fields>
10948                 <links>
10949                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10950                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10951                 </links>
10952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10953                         <actions>
10954                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10955                                 <retrieve/>
10956                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10957                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10958                         </actions>
10959                 </permacrud>
10960         </class>
10961
10962         <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">
10963                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10964                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10965                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10966                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10967                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10968                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10969                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10970                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10971                 </fields>
10972                 <links>
10973                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10974                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10975                 </links>
10976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10977                         <actions>
10978                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10979                                 <retrieve/>
10980                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10981                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10982                         </actions>
10983                 </permacrud>
10984         </class>
10985
10986
10987         <!-- ********************************************************************************************************************* -->
10988         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10989         <!-- ********************************************************************************************************************* -->
10990         <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">
10991                 <fields oils_persist:primary="id">
10992                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10993                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10994                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10995                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10996                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10997                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10998                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10999                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11000                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11001                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11002                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11003                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11004                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11005                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11006                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11007                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11008                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11009                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11010                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11011                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11012                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11013                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11014                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11015                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11016                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11017                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11018                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11019                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11020                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11021                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11022                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11023                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11024                 </fields>
11025                 <links>
11026                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11027                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11028                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11029                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11030                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11031                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11032                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11033                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11034                 </links>
11035         </class>
11036
11037         <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">
11038                 <fields oils_persist:primary="id">
11039                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11040                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11041                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11042                 </fields>
11043                 <links>
11044                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11045                 </links>
11046         </class>
11047
11048         <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">
11049                 <fields oils_persist:primary="id">
11050                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11051                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11052                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11053                 </fields>
11054                 <links>
11055                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11056                 </links>
11057         </class>
11058
11059         <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">
11060                 <fields oils_persist:primary="id">
11061                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11062
11063                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11064                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11065                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11066
11067                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11068                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11069                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11070
11071                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11072                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11073
11074                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11075                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
11076                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
11077
11078                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
11079                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
11080
11081                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
11082                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11083                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11084
11085                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11086                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11087                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11088
11089                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11090                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11091                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11092                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11093
11094                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11095                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11096
11097                 </fields>
11098                 <links>
11099                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11100                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11101                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11102                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11103                 </links>
11104         </class>
11105
11106         <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">
11107                 <oils_persist:source_definition>
11108
11109             SELECT
11110                 po.ordering_agency AS ordering_agency,
11111                 po.id AS purchase_order,
11112                 li.id AS lineitem,
11113                 lid.id AS lineitem_detail,
11114                 cpa.id AS claim_policy_action
11115             FROM
11116                 acq.lineitem_detail lid
11117                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11118                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11119                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11120                 JOIN acq.claim_policy_action cpa ON (
11121                     cpa.claim_policy = cp.id
11122
11123                     -- we only care about claim policy actions whose claim
11124                     -- interval we'd reached or exceeded
11125                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11126
11127                     -- filter out all claim policy actions where claim events
11128                     -- have occurred on or after the action's action_interval
11129                     AND NOT EXISTS (
11130                         SELECT 1
11131                         FROM
11132                             acq.claim_event evt
11133                             JOIN acq.claim claim ON (
11134                                 claim.id = evt.claim
11135                                 AND claim.lineitem_detail = lid.id
11136                             )
11137                         WHERE
11138                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11139                     )
11140                 )
11141             WHERE
11142                 lid.cancel_reason IS NULL
11143                 AND li.cancel_reason IS NULL -- belt/suspenders
11144                 AND po.cancel_reason IS NULL -- belt/suspenders
11145                 AND lid.recv_time IS NULL
11146                 AND po.state = 'on-order'
11147             ORDER BY 1, 2, 3, 4, 5
11148
11149                 </oils_persist:source_definition>
11150                 <fields>
11151                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11152                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11153                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11154                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11155                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11156                 </fields>
11157                 <links>
11158                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11159                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11160                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11161                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11162                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11163                 </links>
11164         </class>
11165         <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">
11166                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11167                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11168                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11169                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11170                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11171                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11172                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11173                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11174                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11175                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11176                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11177                 </fields>
11178                 <links>
11179                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11180                 </links>
11181     </class>
11182         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11183                 <oils_persist:source_definition>
11184             SELECT * FROM acq.lineitem_summary 
11185                                 WHERE item_count > (invoice_count + cancel_count)
11186         </oils_persist:source_definition>
11187                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11188                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11189                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11190                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11191                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11192                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11193                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11194                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11195                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11196                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11197                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11198                 </fields>
11199                 <links>
11200                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11201                 </links>
11202     </class>
11203         <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">
11204                 <oils_persist:source_definition>
11205
11206                         SELECT  t.*
11207                           FROM  action.transit_copy t
11208                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11209                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11210                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11211
11212                 </oils_persist:source_definition>
11213                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11214                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11215                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11216                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11217                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11218                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11219                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11220                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11221                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11222                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11223                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11224                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
11225                 </fields>
11226                 <links>
11227                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11228                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11229                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11230                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11231                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11232                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11233                 </links>
11234         </class>
11235
11236     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11237                 <oils_persist:source_definition>
11238
11239         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11240                 SELECT
11241                         cp.id as copy,
11242                         COUNT(circ.id),
11243                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11244                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11245                 FROM
11246                         asset.copy cp
11247                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11248                 GROUP BY 1, 3, 4
11249                 UNION ALL
11250                 SELECT
11251                         cp.id as copy,
11252                         COUNT(circ.id),
11253                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11254                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11255                 FROM
11256                         asset.copy cp
11257                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11258                 GROUP BY 1, 3, 4
11259                 UNION ALL
11260                 SELECT
11261                         id as copy,
11262                         circ_count,
11263                         -1 AS year,
11264                         false as is_renewal
11265                 FROM
11266                         extend_reporter.legacy_circ_count
11267         )x GROUP BY 1, 3, 4
11268
11269                 </oils_persist:source_definition>
11270         <fields>
11271             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11272             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11273             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11274             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11275         </fields>
11276                 <links>
11277                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11278                 </links>
11279                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11280                         <actions>
11281                                 <retrieve/>
11282                         </actions>
11283                 </permacrud>
11284     </class>
11285
11286         <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">
11287                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11288                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11289                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11290                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11291                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11292                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11293                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11294                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11295                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11296                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11297                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11298                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11299                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11300                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11301                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11302                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11303                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11304                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11305                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11306                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11307                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11308                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11309                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11310                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11311                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11312                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11313                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11314                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11315                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11316                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11317                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11318                 </fields>
11319                 <links>
11320                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11321                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11322                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11323                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11324                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11325                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11326                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11327                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11328                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11329                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11330                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11331                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11332                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11333                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11334                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11335                 </links>
11336         </class>
11337
11338     <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">
11339         <fields oils_persist:primary="id">
11340             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11341             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11342             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11343             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11344             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11345             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11346             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11347             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11348             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11349             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11350             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11351             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11352             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11353             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11354             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11355             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11356             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11357             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11358             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11359             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11360             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11361             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11362             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11363             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11364             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11365             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11366             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11367             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11368             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11369             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11370             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11371             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11372             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11373             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11374         </fields>
11375         <links>
11376             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11377             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11378             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11379             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11380             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11381             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11382             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11383             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11384         </links>
11385     </class>
11386
11387     <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">
11388         <fields oils_persist:primary="id">
11389             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11390             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11391             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11392             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11393         </fields>
11394         <links>
11395             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11396             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11397         </links>
11398     </class>
11399
11400     <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">
11401         <fields oils_persist:primary="owning_lib">
11402             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11403             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11404             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11405         </fields>
11406         <links>
11407             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11408         </links>
11409     </class>
11410
11411     <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">
11412         <fields oils_persist:primary="id">
11413             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11414             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11415             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11416             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11417             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11418         </fields>
11419         <links>
11420             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11421             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11422             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11423         </links>
11424     </class>
11425
11426     <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">
11427         <fields oils_persist:primary="circ_lib">
11428             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11429             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11430             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11431             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11432         </fields>
11433         <links>
11434             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11435             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11436         </links>
11437     </class>
11438
11439     <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">
11440         <fields oils_persist:primary="id">
11441             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11442             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11443             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11444             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11445             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11446         </fields>
11447         <links>
11448             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11449             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11450             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11451         </links>
11452     </class>
11453
11454     <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">
11455         <fields oils_persist:primary="home_ou">
11456             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11457             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11458             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11459             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11460         </fields>
11461         <links>
11462             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11463             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11464         </links>
11465     </class>
11466         <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">
11467                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11468                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11469                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11470                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11471                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11472                 </fields>
11473                 <links>
11474                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11475                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11476                 </links>
11477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11478                         <actions>
11479                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11480                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11481                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11482                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11483                         </actions>
11484                 </permacrud>
11485         </class>
11486         <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">
11487                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11488                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11489                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11490                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11491                 </fields>
11492                 <links>
11493                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11494                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11495                         </links>
11496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11497                 <actions>
11498                                 <create permission="ADMIN_ACQ_FUND_TAG">
11499                                         <context link="tag" field="owner"/>
11500                                 </create>
11501                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11502                                         <context link="tag" field="owner"/>
11503                                 </retrieve>
11504                                 <update permission="ADMIN_ACQ_FUND_TAG">
11505                                         <context link="tag" field="owner"/>
11506                                 </update>
11507                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11508                                         <context link="tag" field="owner"/>
11509                                 </delete>
11510                         </actions>
11511                 </permacrud>
11512         </class>
11513         <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">
11514                 <oils_persist:source_definition><![CDATA[
11515                 SELECT
11516                         poi.purchase_order AS purchase_order,
11517                         ii.invoice AS invoice,
11518                         NULL AS lineitem,
11519                         poi.id AS po_item,
11520                         NULL AS picklist
11521                 FROM
11522                         acq.po_item poi
11523                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11524                 UNION SELECT
11525                         jub.purchase_order AS purchase_order,
11526                         ie.invoice AS invoice,
11527                         jub.id AS lineitem,
11528                         NULL AS po_item,
11529                         jub.picklist AS picklist
11530                 FROM
11531                         acq.lineitem jub
11532                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11533                 UNION SELECT
11534                         ii.purchase_order AS purchase_order,
11535                         ii.invoice AS invoice,
11536                         NULL AS lineitem,
11537                         NULL AS po_item,
11538                         NULL AS picklist
11539                 FROM
11540                         acq.invoice_item ii
11541                 WHERE ii.po_item IS NULL
11542                 UNION SELECT
11543                         ie.purchase_order AS purchase_order,
11544                         ie.invoice AS invoice,
11545                         NULL AS lineitem,
11546                         NULL AS po_item,
11547                         NULL AS picklist
11548                 FROM
11549                         acq.invoice_entry ie
11550                 WHERE ie.lineitem IS NULL
11551                 UNION SELECT
11552                         NULL AS purchase_order,
11553                         NULL AS invoice,
11554                         jub.id AS lineitem,
11555                         NULL AS po_item,
11556                         jub.picklist AS picklist
11557                 FROM
11558                         acq.lineitem jub
11559                 WHERE jub.purchase_order IS NULL
11560                 ]]></oils_persist:source_definition>
11561                 <fields>
11562                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11563                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11564                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11565                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11566                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11567                 </fields>
11568                 <links>
11569                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11570                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11571                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11572                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11573                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11574                 </links>
11575         </class>
11576         <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">
11577                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11578                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11579                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11580                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11581                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11582                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11583                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11584                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11585                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11586                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11587                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11588                 </fields>
11589                 <links>
11590                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11591                 </links>
11592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11593                         <actions>
11594                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11595                                 <retrieve/>
11596                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11597                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11598                         </actions>
11599                 </permacrud>
11600         </class>
11601
11602         <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">
11603                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11604                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11605                         <field name="date_applied" reporter:datatype="timestamp"/>
11606                         <field name="org" reporter:datatype="org_unit"/>
11607                         <field name="original_value" reporter:datatype="text"/>
11608                         <field name="new_value" reporter:datatype="text"/>
11609                         <field name="field_name" reporter:datatype="link"/>
11610                 </fields>
11611                 <links>
11612                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11613                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11614                 </links>
11615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11616                         <actions>
11617                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11618                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11619                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11620                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11621                         </actions>
11622                 </permacrud>
11623         </class>
11624         <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">
11625                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11626                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11627                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11628                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11629                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11630                 </fields>
11631                 <links>
11632                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11633                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11634                 </links>
11635         </class>
11636         <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">
11637                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11638                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11639                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11640                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11641                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11642                 </fields>
11643                 <links>
11644                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11645                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11646                 </links>
11647         </class>
11648         <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">
11649                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11650                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
11651                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11652                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11653                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11654                 </fields>
11655                 <links>
11656                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11657                 </links>
11658                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11659                         <actions>
11660                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11661                                 <retrieve/>
11662                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11663                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11664                         </actions>
11665                 </permacrud>
11666         </class>
11667         <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">
11668                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11669                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11670                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11671                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11672                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11673                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11674                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11675                 </fields>
11676                 <links>
11677                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11678                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11679                 </links>
11680                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11681                         <actions>
11682                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11683                                 <retrieve/>
11684                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11685                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11686                         </actions>
11687                 </permacrud>
11688         </class>
11689         <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">
11690                 <fields oils_persist:primary="code">
11691                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
11692                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
11693                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
11694                 </fields>
11695                 <links>
11696                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11697                 </links>
11698                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11699                         <actions>
11700                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11701                                 <retrieve/>
11702                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11703                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11704                         </actions>
11705                 </permacrud>
11706         </class>
11707         <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">
11708                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
11709                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11710                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
11711                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11712                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11713                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
11714                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
11715                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
11716                 </fields>
11717                 <links>
11718                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
11719                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11720                 </links>
11721                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11722                         <actions>
11723                                 <create permission="ADMIN_COPY_TAGS" context_field="owner"/>
11724                                 <retrieve/>
11725                                 <update permission="ADMIN_COPY_TAGS" context_field="owner"/>
11726                                 <delete permission="ADMIN_COPY_TAGS" context_field="owner"/>
11727                         </actions>
11728                 </permacrud>
11729         </class>
11730         <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">
11731                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
11732                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11733                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
11734                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
11735                 </fields>
11736                 <links>
11737                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11738                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
11739                 </links>
11740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11741                         <actions>
11742                                 <create permission="UPDATE_COPY">
11743                     <context link="copy" field="circ_lib"/>
11744                 </create>
11745                                 <retrieve/>
11746                                 <update permission="UPDATE_COPY">
11747                     <context link="copy" field="circ_lib"/>
11748                 </update>
11749                                 <delete permission="UPDATE_COPY">
11750                     <context link="copy" field="circ_lib"/>
11751                 </delete>
11752                         </actions>
11753                 </permacrud>
11754         </class>
11755         <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">
11756         <oils_persist:source_definition>
11757         SELECT ahcm.target_copy AS id,count(*) AS count
11758          FROM
11759          action.hold_request ahr,
11760          action.hold_copy_map ahcm
11761          WHERE
11762          ahr.cancel_time IS NULL AND
11763          ahr.fulfillment_time IS NULL AND
11764          ahr.capture_time IS NULL AND
11765          ahr.id = ahcm.hold
11766          GROUP BY ahcm.target_copy
11767         </oils_persist:source_definition>
11768         <fields oils_persist:primary="id">
11769             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11770             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11771         </fields>
11772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11773             <actions>
11774                <retrieve/>
11775             </actions>
11776         </permacrud>
11777         </class>
11778
11779         <!-- ********************************************************************************************************************* -->
11780
11781 </IDL>
11782
11783 <!--
11784     vim:noet:ts=4:sw=4:
11785 -->